Normal atmospheric conditions
In order to understand inversions, we must first understand normal atmospheric conditions. Under normal circumstances, the air near the surface of the Earth is warmer than the air above it.
Typically air is hottest at the ground. Air is fairly transparent to sunlight, most of which passes straight through it without heating it. When the sunlight reaches the ground it is almost entirely absorbed, heating the land. Some of this energy is then re-radiated as blackbody radiation, and due to the average temperatures involved, much of this is in the infrared. Unlike the original sunlight, infrared light interacts more strongly with air, which is then heated from below.
Hot air, however, rises. This leads to constant convection which draws the warmer air up, to be replaced with cooler air which is then heated. It is this process that leads to cloud building, thermals, and other convection related atmospheric behaviour.
How inversions occur
However, it is sometimes possible to find situations where the gradient is inverted, so that the air gets actually colder as you approach the surface of the Earth. This is a temperature inversion. It is most commonly created by the movement of air masses of different temperature moving over each other. A warm air mass moving over a colder one can "shut off" the convection effects, keeping the cooler air mass trapped below. (see capping inversion)
With the disruption of normal convection, a number of phenomena are associated with a temperature inversion. One common effect is the general "stillness" of the air, as is dirty or foggy air which can no longer be pulled away from the surface.
The index of refraction of air decreases as the air temperature increases, a side effect of hotter air being less dense. Normally this results in distant objects being shortened vertically, an effect that is easy to see at sunset (where the sun is "squished" into an orb). In an inversion the normal pattern is reversed, and distant objects are instead streched out or appear to be above the horizon. This leads to the interesting optical effects of Fata Morgana or mirage.
Similarly, radio (being part of the electromagnetic spectrum, like light) can be re-directed by such inversions. This is why it is not uncommon to hear radio (and sometimes TV) broadcasts from seemingly impossible distances on foggy nights. The signal, still more than powerful enough to receive even at hundreds or thousands of miles or kilometres, would normally be refracted up and away from the ground-based antenna, but is now refracted back down instead. This phenomenon is called tropospheric ducting, or a tropo duct.