Let’s start with the two basic principles that make modern refrigeration possible:
The first rule you know already if you’ve ever inflated a tire using a hand pump and noticed that the pump was surprisingly hot afterward: Gases will heat up when you compress them.
Conversely, gases cool down when you release pressure and allow them to expand. You’ve experienced these cooling properties when water evaporates off your skin on a hot day.
The other rule you likely learned while eating Popsicles: When two things of different temperatures come in contact, the hotter thing cools and the cooler thing heats up.
The coils and tubes of a refrigerator contain a gas. In the bad old days it was Freon, the brand name for a chlorofluorocarbon that was discontinued because it was eating Earth’s ozone layer. Nowadays, new refrigerators use ammonia gas.
The refrigerator motor runs a compressor that squeezes the gas, heating it up. If it simply reduced the pressure again, the gas would quickly return to room temperature. Instead, though, your refrigerator pushes the hot, compressed ammonia gas through coils on the back or bottom of your fridge, where it loses heat to the surrounding air and cools way down, so much so that the compressed gas turns into a liquid.
The high pressure also forces the liquid through a tiny valve into a series of coils inside the refrigerator.
This area has little pressure because much of its gas has already been pumped into the high-compression area. As a result, the liquid immediately vaporizes back into a gas and expands with abandon, cooling down to arctic temperatures. As it flows through coils in your freezer section, the gas brings temperatures below freezing while still being cool enough to absorb heat from the main part of your refrigerator.
Finally, the gas is sucked back into the compressor to begin the process all over again. And that’s how refrigerators work in a nutshell.