A refrigerator works by using a compressor to compress a gas into a hot vapor, which is then cooled into a liquid in the condenser. This liquid absorbs heat from inside the refrigerator cabinet as it evaporates back into a gas. A fan circulates the cold air to keep food preserved while the gas is absorbed again by the compressor, repeating the refrigeration cycle.