A refrigerator works on the principle of heat transfer, where a refrigerant absorbs heat from inside the fridge and releases it outside. This cycle of compression, condensation, and evaporation keeps the interior cool, preserving food by slowing down bacterial growth and spoilage.