The main principle behind getting your food cold in the refrigerator is thermodynamics. Refrigerators don't actually chill your food by adding cold air to the food compartment -- not exactly, anyway. What actually happens is that when you put a cold item and a warmer item side by side, the warmer item absorbs the cold from the cold item and the cold item absorbs the heat from the warmer item. In this case, the warmer item is the food compartment and its contents, while the cold item is the tubing that carries the refrigerant throughout the system.
Refrigerators use a refrigerant gas that circulates throughout the cooling system. When this gas is compressed, it heats up. A pump and motor on the backside of the refrigerator called the compressor does this. The warm gas runs through exterior coils on the unit and transfers the heat to the outside air, cooling the gas. This is the first use of thermodynamics, since the compressed gas is warmer than the outside ambient air.
As the gas cools on the exterior of the refrigerator, it begins to condense and becomes liquid. The gas at this point is still under immense pressure, but has been given time to cool somewhat -- but it isn't cool enough yet.
Just inside the freezer compartment of most refrigerators is the expansion chamber, located at the point where the liquid gas enters the interior of the fridge and flows to the cooling coil. Just as the refrigerant heats up when compressed, it cools very quickly and dramatically as it expands. When the refrigerant passes through this expansion chamber, it becomes gas again, turning very cold and chilling the cooling coil to below-freezing temperatures. This is how your freezer compartment keeps foods in this area frozen. A fan also blows the cold air throughout the rest of the refrigerator to help with cooling the fresh food compartments. The cold gas circulates through tubes that use thermodynamics to pull heat out of the compartment and transfers heat back into the gas. The refrigerant returns to the compressor to start the cycle all over again.
The compressor comes on and off as the refrigerator needs it. The way it knows to come on is through a component called the thermocouple. This device acts as a thermostat and sends the signal to the compressor to come on when the refrigerator temperature get too high internally.