A heat pump runs on electric and works, in principle, the opposite way to a fridge. It draws in warm outside air and passes it over a refrigerant liquid contained in a series of tubes. This then warms up and expands into gas, which is then compressed to increase the pressure, boosting the temperature of it from warm to hot. The hot gas then goes into a heat exchanger that, in turn, heats the water or air within the home. Once cooled, the gas condenses back into a liquid and returns to the beginning of the cycle again.
You can setup heat pumps to feed a wet central heating system (water/steam radiators) using the water heated at the exchanger, as well as providing hot water for taps and showers (fed, initially, to a storage cylinder). These are known as air-to-water heat pumps.
Heat pumps look a lot like air conditioning units and, like those units, they are installed outside your home. Since electricity is used to run them, they are aren't an entirely carbon-free method of heating, unless powered solely by renewable energy. However, the amount of electricity they need to heat the home is relatively small.
It may be counter intuitive, but the outside air temperature does not need to be high for pumps to work. Even when the temperature is below zero, outside air source heat pumps still work very efficiently to heat your home and your hot water.
Another type is an air-to-air heat pump, which uses hot air from the exchanger fed to warm the home via a series of fans; which, in tern, requires installation of an air circulation system. Air-to-air heat pumps do not produce hot water, and are not eligible for the government's low carbon heating schemes. When discussing heat pumps in the UK, this usually refers to air-to-water pumps.