Thermal underwear works by trapping air close to your body, creating a layer of insulation. This insulation helps retain body heat and keep you warm in colder weather conditions.