What are the three requirements for geothermal energy?
Accessible heat source, heat transfer medium, and a steam/electric generator
The geothermal energy must be accessible in a controlled fashion. It is impractical to try to tap magma directly! Usually the heat transfer is by ground water that is flashed into steam by the hot rock and is extractable by natural vents or constructed piping.
The steam needs to be used to turn a turbine to drive a generator if electrical power is desired. Otherwise, a simple distribution system for the steam (local only) can be used for thermal energy.
Normally the steam condensate is returned to the rock formation to reduce water losses over time.