Heat pumps work on the same principle as a fridge. In the summer the evaporator inside gets colder and the condenser fins outside radiate the heat that has been removed from the inside. Simple.
In the winter the process is reversed, with the inside getting warmer and the outside colder.
Because the system is only transferring heat from one place to another, the heat is already there, so the only power consumption is by the motor driven compressor that moves it around, (hence the name 'heat pump') and the fans that push air through the condenser and evaporator.
I don't have one at home, but I do in my office. The figure of 1kw producing 3kw of heat may be achievable under perfect conditions, but will vary according to the ambient temperature. I find that efficiency falls when the outside temperature drops to near zero or below as there is less heat in the air to transfer. It did maintain 21 degrees in the recent very cold spell, but had to be left on for 24 hours to do so. If it was switched off overnight, the temperature had dropped to 16 degrees by the morning and took until mid afternoon to get back to 21.
Part of the problem in the winter is that the air emitted from the outside unit colder than the ambient and so the outdoor unit can ice up even when the outdoor temperature is above zero. The unit automatically defrosts when this happens, but no heat is produced whilst this is in progress.
Ground source heat pumps don't suffer from this problem as the ground temperature at the depth the coils are buried always remains above freezing.