Heat pumps pump heat. It's as simple as that. They extract energy from one place, which gets cooler, and pump it to another place, making it warmer. These clever machines make it possible to take free heat from the environment and put it exactly where you want it.
A fridge removes energy from he cold interior, cooling it down further, and releases it out the back, creating a stream of warm air. 'Ground source heat pumps' work in exactly the same way but their purpose is to provide warmth rather than to cool things down. They extract energy from the ground, where the temperature is a steady 10 degrees celcius, and transfer it to the inside of your house. The sun beats down on the ground all year, so there is no shortage of energy stored in the earth. Heat pumps do not store heat, they just move it from one place to another.
Three independent loops of fluid are needed to perform the heat pump's task. The first is a loop of anti-freeze that runs underneath your lawn and absorbs heat from the ground. The last is the loop of hot water that emits this heat into your home through underfloor heating or radiators. In between is the loop of refrigerant inside the heat pump that shifts the energy from a relatively cool fluid to a warm fluid, it cannot work by the natural flow of energy. Instead, the refrigerant is repeatedly evaporated, compressed and condensed to pump the heat in the 'wrong' direction
Quite a lot of electrical energy is needed to power the refrigerant cycle, especially the compresser. This means that heat pumps are not necessay cheap to run or 100% green, despite the fact that they are extracting spare solar heat from the ground. Electricity is the most expensive domestic fuel and has the highest carbon emissions because so much energy is wasted in the power station. Electricity has aout 2.5 times the carbon emissions of natural gas (the cleanest fossil fuel) and costs about three times as much. However the heat energy provided by a groud source heat pump is typically three to five times greater than the electrical energy needed to run it, so heat pumps are still good eco-choices compared to gas, oil or direct electric heating.