Geothermal energy comes from the heat beneath the surface of the Earth.
Beneath the earths crust is magma (molten rock). When magma rises to the surface (eruption from a volcano) it is know an lava.
Magma is roughly 700 to 1300 degrees Celsius. This causes it to heat up the layers of rock above and below it.
This heat is geothermal energy. Some of this energy is released as steam.
This steam is used to turn turbines and a generator, creating electricity.
Australia is currently researching dry rock geothermal energy.
Essentially cold water is injected through bore holes onto hot granite rocks. The steam produced turns turbines. The steam is then condensed and re-injected as water.