Here's how:
* Heat Source: Magma acts as a massive heat source, providing high temperatures deep within the Earth.
* Water Interaction: Water, often from underground sources, comes into contact with the hot magma. This heats the water to high temperatures.
* Steam Generation: The heated water turns into steam, creating a powerful source of energy.
* Power Generation: The steam drives turbines, which in turn generate electricity.
Geothermal power is a renewable and environmentally friendly energy source, as it harnesses the natural heat from the Earth.