On most days, the temperature of air in the atmosphere decreases with altitude. This is because most of the suns energy is converted to sensible heat at the ground, which in turn warms the air at the surface. The warm air rises in the atmosphere, where it expands and cools. Sometimes, however, the temperature of air actually increases with height. The situation of having warm air on top of cooler air is referred to as a temperature inversion, because the temperature profile of the atmosphere is "inverted" from its usual state. There are two types of temperature inversions: surface inversions that occur near the Earth's surface, and aloft inversions that occur above the ground.
Source: National Weather Service Forecast Office, Salt Lake City UT. 2011. What are temperature inversions? Accessed on 9 September 2013. Available at http://www.wrh.noaa.gov