There are many different kinds of heat pump used to heat or cool liquids or gases through heat exchangers. The input is from a compressor, usually driven by an engine which is often an electric motor for smaller units but could be an engine using any fuel.
Compression and expansion of a gas causes it to heat or cool. Heat pumps use various transfer gases under a range of pressures. This gas is pumped around a closed circuit that connects two or more heat exchangers, one input and the rest output. Do not confuse the transfer gas with a working gas running through the open side of a heat exchanger. The transfer gas is often called the refrigerant.
A variety of liquids or gases can be fed to the input and output heat exchangers. Some systems are reversible, swapping the inputs and outputs. In different modes and different world areas, terminology is diverse.