Heat pumps do not generate any heat at all instead as the name applies they move (pump) heat.
It just happens that physics allow you to move 3 or 4 kW (maybe even more in future) of heat energy from outside air inside with 1kW of energy and thus the COP. And if you run the loop in reverse you get what is traditionally called air conditioning.
How traditional heat pumps do this is with a refrigeration cycle just like your fridge or freezer does basically by compressing and decompressing a gas.
It just happens that physics allow you to move 3 or 4 kW (maybe even more in future) of heat energy from outside air inside with 1kW of energy and thus the COP. And if you run the loop in reverse you get what is traditionally called air conditioning.
How traditional heat pumps do this is with a refrigeration cycle just like your fridge or freezer does basically by compressing and decompressing a gas.