You move the heat and some air becomes colder (inside) and some air becomes hotter (outside). Any sufficiently advanced technology is indistinguishable from magic.
When you compress a gas, it releases energy as heat. When the gas expands, it absorbs energy by getting cold.
This gas is the refrigerant that the article refers to. Basically, what air conditioners, refrigerators, heat pumps, ect, do, is compress and expand the gas in a closed loop.
The whole theory behind a heat pump is that you get more heat, per unit of input energy, than if you used the input energy directly for heat. The consequence is that you end up blowing cold air outside.