A heat pump is a device that uses energy—generally mechanical energy, although the absorption heat pump instead uses thermal energy—to transfer heat from one space to another. The mechanical heat pump, also known as a Cullen engine, uses electric power to transfer heat by compression. Specifically, it transfers thermal energy by means of a heat pump and refrigeration cycle, cooling one space and warming the other. In winter, a heat pump can move heat from the cool outdoors to warm a house; in summer, it may also be designed to move heat from the house to the warmer outdoors. As it transfers rather than generates heat, it is more energy-efficient than heating by gas boiler.
In a typical vapour-compression heat pump, a gaseous refrigerant is compressed so its pressure and temperature rise. When the pump operates as a heater in cold weather, the warmed gas flows to a heat exchanger in the indoor space, where some of its thermal energy is transferred to that space, causing the gas to condense into a liquid. The liquified refrigerant flows to a heat exchanger in the outdoor space, where the pressure falls, the liquid evaporates, and the temperature of the gas falls. Now colder than the temperature of the outdoor space being used as a heat source, it can again take up energy from the heat source, be compressed, and repeat the cycle.