A heat pump is a variation of an air conditioner where the condenser and evaporator can swap roles. When it's running, the evaporator gets cold and the condenser gets hot. In your home AC, there is a fan that moves air over the evaporator to cool the house, and there's a separate box outside with a fan pulling the heat out of the condenser. That heat is coming from
inside the house! (

) Now imagine turning that flow around... The part inside the house becomes the condenser and gets hot because it moves (pumps) the heat from outside the house. But, that also means the box outside your house, which is now in the role of evaporator, will get cold. Really cold. Like, almost instant frostbite cold. This works, even when it's cold outside, because the air outside is still warmer than how cold the evaporator is getting.