When the rising hot water and steam is trapped in permeable and porous rocks under a layer of impermeable rock, it can form a geothermal reservoir.