Why are inversion layers so important in meteorology?
Farrenthope is correct, but I would like to add some detail.

An inversion occurs when the air is warmer than the ground. It is called an inversion because it is the opposite of what occurs during the day. During the day, the ground is heated by the sun and the air near the ground rises.

However, during clear and calm nights, the ground will cool faster than the air. This means that at a certain time, the air will be warmer than the ground. With nothing to move pollutants upward, the air just stagnates. People will still keep pumping pollutants out, with the pollution just accumulating. During the day, however, the pollutants are lifted upwards, and do not stagnate.

For those mathematically affluent, the equation for a concentration of a pollutant can be written as $$\frac{\partial c}{\partial t}=-\vec{v}\cdot\nabla_h c-w\frac{\partial c}{\partial z}+\nabla \cdot (K\nabla c) +S_c(t)+C$$

where $c$ is the concentration of the pollutant, $\vec{v}$ is the wind vector, $w$ is the vertical velocity, $K$ is the Fick's law constant, and $C$ is the chemistry term.

If we consider the following assumptions which are common, regardless of an inversion:


Diffusion is a small process ($K\approx0$)
The pollutant undergoes no chemical change ($C\approx0$)
The equation boils down to
$$\frac{\partial c}{\partial t}=-\vec{v}\cdot\nabla_h c-w\frac{\partial c}{\partial z}+S_c(t)$$


During an inversion, because air at the surface is not going up, there is no air going down. This means $w\approx0$. With no vertical velocity, the air near the ground is slowed by the drag the ground has on the air, making $\vec{v}\approx0$. This boils the equation down to $$\frac{\partial c}{\partial t}=S_c$$.
Since $S_c \ge0$, $c$ will just keep increasing.

A good example of a dangerous inversion is the Donora event.