Geothermal energy works by pumping cold water underground where hot rocks heat the water into steam, which is then used to generate electricity. It is renewable with no pollution, but is only viable in few locations and can be costly to implement due to deep drilling required.