It was a clear night last night. We could see the cosmos, which has an average temperature of around 3 Kelvin. As such, it emits very little black-body electromagnetic radiation. The Earth's surface is much warmer at maybe 280 Kelvin so it radiates more. The net effect is that thermal energy is lost from the surface of the Earth. The air next to the surface becomes cold enough for water vapour to condense and a layer of mist forms. The upper atmosphere receives thermal radiation from the Sun first and will be at a higher temperature so the mist seems trapped at ground level. Normally the air temperature is warmer at ground level and lower higher up. This is the other way round: a temperature inversion.