Electricity consumption is only used to transfer heat from the surrounding environment, such as air.
The heat pump has the ability to absorb heat (not create heat) and transfer heat by means of a refrigerant, which captures the heat in the ambient air and transfers it to heat water.
The fan on the heat pump circulates air through the outer evaporator that acts as a heat collector. The liquid refrigerant in the evaporator absorbs the available heat in the ambient air, transforming it into refrigerant. The refrigerant is then pumped into a compressor. When this warmed refrigerant is compressed, it intensifies or concentrates the heat, similar to a magnifying glass to the sun.
This intensely hot refrigerant is then pumped into a heat exchanger condenser where the actual heat transfer takes place. As the water passes through the heat exchanger, the hot gas gives up its heat to the cooler water. The refrigerant returns to a liquid state and is pumped through an expansion valve and then into an evaporator air coil, which starts the process all over again