Refrigerators and freezers use insulation and cooling agents like ammonia to keep temperatures below freezing. This allows food to be preserved for long periods by freezing it quickly to form small ice crystals that don't damage cell structures. Thermostats regulate temperatures to keep food safely frozen or refrigerated.