Heat pump
On the cooling side, heat is taken up to boil the refrigerant from a liquid to a gas. Then the fluid moves to the heating side.There, the compressor forces the refrigerant back to a liquid again. This makes it give up its heat. So heat has moved from the cooling side to the heating side. Then, the cycle repeats.