Heat from the ground is absorbed at low temperatures into a fluid inside a loop of pipe (a ground loop) buried underground. The fluid then passes through a compressor that raises it to a higher temperature, which can then heat water for the heating and hot water circuits of the house. The cooled ground-loop fluid passes back into the ground where it absorbs further energy from the ground in a continuous process as long as heating is required.
Normally the loop is laid flat or coiled in trenches about two metres deep, but if there is not enough space in your garden you can install a vertical loop down into the ground to a depth of up to 100 metres for a typical domestic home.
Heat pumps need electricity to run, but the heat they extract from the ground, the air, or water is constantly being renewed naturally.
Reference: The Energy Saving Trust