A refrigerator uses Gay-Lussac’s Law and the heat of vaporization of a liquid to remove heat from a system.
Outside the refrigerator
Modern refrigerators use a gas such as isobutane or a hydrofluorocarbon (HFC) like 1,1,2,2-tetrafluoroethane.
A motor and compressor pressurize the gas. According to Gay-Lussac’s Law
##P_1/T_1 = P_2/T_2##
the temperature of a gas increases as the pressure increases.
The hot compressed gas flows through the coils on the back or bottom of a refrigerator and heats the condenser coils.
As the cooler air molecules in the kitchen strike the condenser coil, they absorb energy from the coil and return to the room by convection.
This cools the gas in the coil, and it changes into a liquid because it is under a high pressure.
Inside the refrigerator
The liquid flows through an expansion device. The exit at its far end is at a low pressure because the compressor is pulling the gas out of that side.
When the liquid HFC hits the low-pressure area, it boils and changes into a gas. The energy required to evaporate the liquid is called the heat of vaporization.
Also, according to Gay-Lussac’s Law, the decreased pressure of the gas cools it further.
The cold gas moves in the coils through the freezer and refrigerator.
The air inside the refrigerator is warmer than the gas in the coil.
The air molecules hitting the coil transfer some energy to the coil and then move by convection inside the refrigerator/freezer, where they, in turn, cool the stored food.
The refrigerant evaporates to a gas and then flows back to the compressor, and the cycle starts all over again.