Heat from the outside air
The unit outside takes heat from the air, even below freezing, and warms water. The water goes indoors to your radiators or to the hot water cylinder, then comes back to be warmed again.
It does one at a time: when the cylinder needs heating, the radiators wait for a little while.