The refrigeration cycle is a heat engine operating in reverse, known as a phase change heat pump. Using a refrigerant which boils at a low temperature produces a relative coldness, lowering the temperature of the refrigerator to a level which prevents bacteria from multiplying and ruining food. A refrigeration cycle works on essentially the same principle that makes your hand feel cold when water is evaporating off of it. Other liquids, including some known as refrigerants, produce even lower temperatures when they evaporate.
The refrigeration cycle is a closed loop of gas which undergoes four stages. The first stage is the compressor, which compresses the refrigerant to increase its temperature. The gas is then routed through heat dissipation coils which release heat outside the refrigerator. As it dissipates heat, the refrigerant cools and recondenses into a liquid. This liquid then passes through a high-pressure/low-pressure threshold, called an expansion valve, which causes it to expand and change phases into a gas. The cold gas circulates into the refrigerator again, absorbing heat from the inside, before being routed into the compressor again. The purpose of the refrigeration cycle is to take heat from the inside of the refrigerator and transfer it to the outside.
To understand the refrigeration cycle better, one must be familiar with the idea of a phase change. An evaporating liquid stays at a constant temperature until it makes the phase change into a gas. Boiling water, for example, always stays at the temperature of its boiling point, 212°F (100°C). If a refrigerator could keep food fresh by ensuring that it stays below 300°F (148°C), for example, instead of 40°F (4°C), water could be used as a refrigerant because the boiling point of water would be cold relative to the refrigeration threshold of 300°F.
The traditional refrigerant used in a refrigeration cycle is ammonia, but it is toxic to humans. Ammonia was replaced in the thirties by chlorofluorocarbons (CFCs), but this compound was found to damage the ozone layer and phased out in the seventies. Newer compounds, such as hydrofluorocarbons (HFCs), refrigerate effectively, are non-toxic, and do not damage the ozone layer. The invention of refrigeration is probably one of the most important inventions of the 20th century, allowing food to be transported long distances or kept for long durations without spoiling.