How a Fridge Works
As the coolant flows around the chiller cabinet (usually around a pipe buried in the back wall), it absorbs and removes heat from the food inside.
The compressor squeezes the coolant, raising its temperature and pressure. It's now a hot, high-pressure gas.
The coolant flows through thin pipes on the back of the fridge, giving out its heat and cooling back into a liquid as it does so.
The coolant flows back into the expansion valve and the cycle repeats itself. Heat is constantly picked up from inside the refrigerator and put down again outside it.
Notice that work must be dome to cool the inside of the fridege. In order to take heat from inside the fridge and put it outside, electrical power is needed to drive a motor.