Heat pumps are devices that can move energy from one location to another. The source is typically at a lower temperature, such as the ground or a pond, and the thermal energy is moved to the heat sink, which is at a higher temperature. Some freezers and air conditioners are heat pump systems, but the term itself usually means one of the systems that's used for more than just cooling. The same type of refrigeration loop is used for heating with a pump merely by shifting the warm end of the device to the indoor space where heating is needed.
Some of the energy transformed during operation of a heat pump reappears as energy in the heat sink. These pumps move thermal energy in opposing directions from the temperature, and can be used to maintain either a heated or a cooled space. They use some thermal energy retrieved from the environment for some of the delivered energy; in cooler areas, heat pumps typically provide only heating.
In milder climates, reversible-cycle heat pumps are designed that work in both thermal directions. These devices have a simple operation that has a way to change which coil is the evaporator and which is a condenser with a reversing valve. The refrigerant inside the closed loop absorbs heat because it is vaporized, and then releases the heat when it is condensed. Typically, heat pumps used for heating draw heat from either the air or the ground, and are often used to provide heating in high latitude climates because they can bring thermal energy in to a space, or take it out.