A heat pump is a device that can transfer (pump) heat in the opposite direction to its normal direction of flow. Rather than producing heat like other heating methods it moves the heat.
Your fridge is a heat pump. It transfers heat out of food and other contents, and then ejects the heat into the kitchen via the grille at the back. Heat pumps that heat homes work in the opposite direction, transferring heat energy from the ambient air around to water that then circulates through radiators and underfloor heating.
This transfer of heat is not ‘free’, because you need to add energy to operate the system, but the magic of heat pumps is that they can produce far more heat energy (usually three to four times more) than the energy that was inputted.
Electricity generation is becoming cleaner to produce (solar, wind, etc.) which means that CO emissions produced by heat pumps are significantly lower than heating systems that use oil or gas.
Heat pumps have been classified as green by the UK government and this is why you can benefit from the Renewable Heat Incentive (RHI) to help recover unit and installation costs.