A heat pump takes low grade heat from the air/ground/water and turns it into useful thermal energy for space heating and hot water. A heat pump works on the same principal as a fridge but in reverse; a fridge takes the heat from the contents you put in it and releases it out into the room.
A heat pump takes the heat from the ground/air/water source and transfers it into a living space.
A ground source heat pump takes heat from the ground via buried loops which are filled with an antifreeze solution. The loops can be placed horizontally in a trench or vertically in bore holes; both are equally efficient.
Heat pumps contain a refrigerant that boils at minus 40oC, when this liquid is exposed to temperatures above that it begins to boil and turn into a gas. (When gas is compressed heat is generated). A compressor in the heat pump is used to compress the gas which creates energy to heat space and or hot water.