A heat pump is a device which moves low temperature heat from a source such as the ground or the air, to a higher temperature heat by use of a refrigerant cycle. This method of moving heat is the same principle as used in a household refrigerator. All heat pumps have the same basic parts.
The evaporator is a heat exchanger. On one side is the medium from which heat is extracted, and the other side is the refrigerant gas. For a ground source heat pump there would be water and anti-freeze circulating through collector pipe work outside the property. For an air source a fan draws air past the evaporator.
At the bottom of the evaporator, low pressure refrigerant gas enters in liquid form. The refrigerant boils off by the addition of a small temperature input from the heat source and at the top of the evaporator it has changed to a gas. This gas is at a relatively low pressure, but its pressure and temperature depend on how much temperature is available from the source.
By means of compression, the pressure of the gas is now increased. The higher the pressure, the greater the temperature. The now high pressure (and hot) gas passes through the condenser which is another heat exchanger, where it releases heat to the hot water of your heating system.
Finally, the gas then travels through the expansion valve where it is now low temperature liquid once more ready to continue its cycle.