You probably own a heat pump without realising it - a refrigerator is actually a type of heat pump. When used for heating, heat pumps save energy by extracting heat from an outside source, and delivering it for use within the building. They can be used for any normal heating need. This apparently magical technology is not new: in the 1950's several heat pumps were installed in a bid to save energy and fuel costs. One of the most famous of these was used to heat the Royal Festival Hall in London by extracting heat from the River Thames.
HOW CAN ENERGY BE EXTRACTED FROM COLD WATER?
Our natural sense of heat is based more on instinct than on science. Humans are warm-blooded and judge "heat" by comparing it by touch. Since our body temperatures need to be maintained within a few degrees centigrade, our natural senses have evolved to make extremes of temperature uncomfortable. To us, a hot summer's day feels many times "hotter" than the freezing mid-winter. But in reality the Earth's surface does not vary in "heat energy" as much as we might imagine. Scientifically speaking, there is only 11% less energy in cold river water at 5°C (40°F) compared to hot bath water at 40°C (105°F).
HOW DOES A HEAT PUMP WORK?
The most familiar form of heat pump is the domestic refrigerator. Here, heat is extracted from the cabinet to keep food fresh and the extracted heat is expelled through the radiator grill at the back of the unit. In this case the heat is merely a waste product. In the heat pump, we utilise this heat, and put the "cold part" outside. To make this more understandable, imagine that the "ice box" of your refrigerator is immersed in a small garden stream and the hot grid from the back is placed inside a house. The "ice box" will attempt to freeze the stream and, if we stopped the stream from flowing, freezing of the water would actually occur. But the passing water will constantly warm up the very cold "ice box". The temperature of the flowing stream will actually be reduced very slightly. So we are extracting heat from the stream, heat which ends up as heat in the radiator grill, available to warm the house. In every case, the useful heat delivered to the house will be greater than the energy required to drive the heat pump itself. So we have extracted "free" heat from the stream.
Here is an alternative simple way of looking at the principle;-
Let us consider an example of an opposite scenario:- If an electric kettle element was immersed in the river or stream and switched on, then the heat would be rapidly absorbed by the water. This would be a continuous loss of heat energy to the stream. The heat would be dispersed and the stream would hardly heat up.
Back to our heat pump, if, conversely, the element was colder than the stream, then the stream would be warming it up, we are therefore absorbing, hence gaining energy.
This principle can be hard to grasp, since it is not an immediately obvious process. The diagram below may help the penny drop.

Extracted heat (2.5kW) + Power input (1kW) = The useful heat output (3.5kW)
The details of the inner workings of a heat pump are not dealt with here but if you are intrigued .... they involve the evaporation and condesation of a working fluid called the Refrigerant, but you don't really need to know this for it to work!