Thermodynamics used for refrigeration heat transfer
In science, thermodynamics is the relationship between heat and different kinds of energy. Refrigeration is about keeping temperatures below the level of a local environment and is primarily used for thermal conditioning, i.e. keeping food items cold or keeping a room cool with air conditioning.
Before understanding how thermodynamics works in refrigeration heat transfer, itís important to understand the three basic rules of thermodynamics. Letís recapÖ

The Zeroth Law

This isnít technically the first law but itís discussed first because itís simplified as:
If thermal equilibrium occurs with two systems then a third system will also be in thermal equilibrium.

The First Law

This states that the total energy in a system is constant, even when itís converted from one form into another. A good example of this is kinetic energy and how when an object such as a car moves then the energy becomes converted to heat energy when a driver begins slowing down using the brakes. The general consensus is that both work and heat are equivalent to each other.

The Second Law

The second law is the most basic and means that heat canít flow into another system at a higher temperature from a system thatís at a lower temperature of its own accord. The only way for this to happen is for work to occur which changes its state of energy.

The Third Law

This makes the statement that when a system approaches entropy then the statistical law of nature defines it as impossible to get to absolute zero in temperature. The entropy of the system means it converts from one form into another but it gets as close as possible to zero on the Kelvin scale for measuring temperature.

Refrigeration Heat Transfer

By applying the three laws of thermodynamics itís possible to work out how refrigeration heat transfer happens. Air conditioners or refrigerators cool items down in a warm environment. The second law of thermodynamics applies here because as with heat pumps, the refrigerator requires work input for a heat transfer to happen.
Modern households use a synthetic chemical compound such as HFC-134a otherwise referred to as tetrafluoroethane which circulates through the refrigerator via a motor and compressor. Itís heated up by a gas and pressurised as itís compressed through coils on the back or bottom of the refrigerator.

The second law of thermodynamics states that work has to occur to change the substanceís state of energy from a higher to a lower temperature. Therefore if the liquid in the refrigerator turns to vapour it would have absorbed heat through boiling, but if it changes from vapour to liquid it has released heat via condensation.
As heat always flows in the same direction from a high to a low temperature, refrigerators exploit this property. Evaporators which contain refrigerant will therefore boil at low temperatures to absorb the heat within the refrigerator, while in comparison, condensors contain heat-laden liquid refrigerant which releases the heat into a relatively cool air environment.