Just as the title says, I heard about this term but am not sure how it works.
Normally, temperature broadly decreases with altitude, and convection is effective: locally warmer air will rise, and cooler air will fall. A temperature inversion is where the air temperature rises with altitude. This means that convection is less effective because the air above is already warmer, and so there is less mixing of air between altitudes.
Since pollution is generally produced at ground level, temperature inversions can trap the pollution (e.g. smog) at ground level.
As others have noted, a temperature inversion is a layer where temperature increases with height. This is called an inversion because the normal temperature profile decreases with height.
A temperature inversion can trap pollution. Factors that influence this are the environmental temperature profile, the height of the chimneys or smokestacks that expel pollution and the temperature of the pollutants as they leave the smokestacks.
If the temperature of the air coming from the smokestacks is warmer than its surrounding and the lofted pollutants aren't too heavy, the air will be buoyant and rise. Even in the case of heavy pollutants, those heavy particles tend to fall to the ground near the smokestacks, polluting the ground environment while the rest of the stuff coming out of the stacks rises. This is particularly evident around a coal stack in the winter as the snow steadily turns orange near the stacks. The lofted pollutants will rise with the air they are carried by until they are no longer buoyant and then they will stabilize in height where they find equilibrium.
To demonstrate, consider the following two scenarios.
This scenario has an environmental temperature profile based on a surface temperature of 20 C, a dewpoint around 8 C, no capping inversion and a well mixed boundary layer. The black line represents the temperature a parcel lifted from the surface would have. The pollutants are being emitted from a smokestack with a height around 300 m with a temperature around 22 C. I've also assumed no water vapor coming out of the smokestacks. In this case the air from the smokestack (red) is always warmer than the environment and it escapes the boundary layer and rises well above the surface. This pollution is not trapped.
This scenario has a capping inversion between 900 and 850 mb but is otherwise the same as the previous example (same surface temperature and dewpoint). The pollutants have the same properties as the first scenario. In this case, however, due to the temperature inversion there is a height where the environment becomes warmer than the pollutants. If the pollutant ties to rise any higher it will be negatively buoyant and will oscillate around the height of neutral buoyancy (see Brunt–Väisälä frequency). In this case the pollution will be trapped around 860 mb, which is around 1250 m. This isn't too close to the ground but in a well mixed boundary layer this pollution eventually will be mixed throughout the boundary layer. This pollution is trapped.
Both of these scenarios are on warm well-mixed days. Bigger problems tend to happen at night or early morning and in the cold season. In these cases deep inversions that start at the surface tend to form and if smokestacks are not very tall this can cause pollution to be trapped very close to the ground. This kind of temperature structure will cause the pollutant to spread out at low heights. In places where these type of inversions are frequent it is important that smokestacks are built tall enough to emit pollution above the inversion height. The picture below demonstrates how this kind of pollution trapping can look.
Image by JohanTheGhost, wikimedia commons. https://commons.wikimedia.org/wiki/File:SmokeCeilingInLochcarron.jpg
this is straight from Wikipedia:
In meteorology, an inversion is a deviation from the normal change of an atmospheric property with altitude. It almost always refers to a "temperature inversion", i.e. an increase in temperature with height, or to the layer ("inversion layer") within which such an increase occurs.
An inversion can lead to pollution such as smog being trapped close to the ground, with possible adverse effects on health. An inversion can also suppress convection by acting as a "cap". If this cap is broken for any of several reasons, convection of any moisture present can then erupt into violent thunderstorms. Temperature inversion can notoriously result in freezing rain in cold climates.