The principle is very similar to the operation of a refrigerator, but in reverse. There is latent heat energy in the air and this is transferred to the heating system.The heat pump system contains a fan that sucks air through an evaporator. The evaporator contains very cold liquid refrigerant, which travels through a copper pipe. The air passing through this evaporator contains latent heat which is absorbed by the refrigerant.
Then a compressor pulls the refrigerant inside, where it is naturally compressed. As the pressure rises,the temperature increases. From here the refrigerant travels to the condenser, where the heat from the refrigerant is transferred to the water supply tank.
An expansion valve finally provides the pressure reduction to the refridgerant and the cycle starts again.