In interior Alaska we have come to know a temperature inversion, resulting in cooler temperatures in a valley and sharply higher temperatures in outlying hills. In a normal environment, one would expect the temperatures close the the Earth's surface to be warmer than higher into the atmosphere. While you would expect some temperature difference at higher elevation, nothing drastic would be expected. However in Fairbanks we see something different.
Cool air becomes trapped in under the boundary of an inversion along with (ice) fog and industrial exhaust. Overlooking the valley from a higher elevation, the boundaries of the inversion.
In a typical situation, the Sun heats the surface of the Earth. The heat from the surface radiates upward into the atmosphere. The farther you get from the surface, the more dissapated the heat is, which results in lower temperatures as elevation increases. If there is an inversion, however you achieve an opposite effect.
During the winter season in the northern parts of the world, the (relatively) very little heat from the Sun is not enough to keep the surface warm. In other words, the heat escapes into the atmosphere faster than it is transferred to the surface.
A warmer mass of air might also "cap" another mass of air, which results in boundaries where the temperature changes dramatically. Such boundaries are also visually apparent when fog/smog seems to be trapped by a barrier forming a sort of ceiling.