A heat pump is a refrigerator or an air conditioner that works the other way around. The properties of special gases (freons) are used, which sharply change the temperature depending on the pressure change. At low pressure, the temperature is negative (freezer), at high pressure – the temperature is high. The pressure difference is given by the compressor, the heat exchangers work further. The heat pump itself does not heat anything, but takes away heat anywhere. Energy is used only for pumping, so this high efficiency.