What is the science behind geothermal energy?

what is the science behind geothermal energy