The following is the process by which a refrigerator cools.
The compressor condenses refrigerant
A compressor installed in the back of the refrigerator connected to a long circuit of self-contained tubes condenses a refrigerant gas. Condensation creates heat, so the refrigerant is now a hot gas.
Refrigerant sent to the condenser
The compressed refrigerant is sent to a series of coils behind the refrigerator to cool off. This is the condenser and a fan constantly blows air across these condenser coils to cool the gas. Being exposed to the cooler air in the kitchen helps to dissipate the heat further, turning it back into a liquid.
Refrigerant sent to expansion device
The cooling liquid is passed through an expansion device that lowers the pressure. Reducing the pressures on the refrigerant releases even more heat from it. It also turns some of it back into a gas.
Refrigerant sent to freezer
The now cooled liquid and gas mix is sent up to the freezer and down into the refrigerator via evaporator coils. On this journey, it absorbs heat from the freezer and the refrigerator with the aid of a second fan that blows air from the refrigerator across the cold coils. As it heats up, most of the liquid evaporates back into a gas and the cooled air is sent back into the refrigerator.