In most cases, as altitude increases, the air in the troposphere cools. Vertical mixing occurs as a result of warm air rising. However, a layer of cool air may form beneath a layer of warm air on occasion. Temperature/thermal inversion refers to this deviation from normal temperature.
When an inversion occurs, polluted areas (such as London and Donora PA) experience unhealthy air and an increase in smog because pollutants are trapped at ground level rather than circulating away.