Clouds form when humid air cools enough for water vapor to condense into droplets or ice crystals. The altitude at which this happens depends on the humidity and the rate at which temperature drops with elevation.
Normally, water vapor can only condense onto condensation nuclei — tiny particles that serve as kernels around which drops can form.
Condensation nuclei are often nothing but natural dust. But soot particles from automobile exhaust or other types of pollution can also serve the purpose. One study has found that changing levels of air pollution cause different rates of cloud formation (and rain) on weekends and weekdays, at least in humid climates with lots of cities.
Clouds are classified into four basic categories, depending largely on the height of their bases above the ground.
High-level clouds, called cirrus clouds, can reach heights of 20,000 feet (6,000 meters) and are typically thin. They do not produce rain and often indicate fair weather. They are usually made up of ice.
Midlevel clouds form between 6,500 feet (2,000 meters) and cirrus level. They are referred to as "alto-" clouds and bear such names as altostratus or altocumulus, depending on their shape. (Altostratus clouds are flat; altocumulus clouds are puffy.) They frequently indicate an approaching storm. They themselves sometimes produce virga, which is rain or snow that does not reach the ground.
Low-level clouds lie below 6,500 feet (2,000 meters). Meteorologists refer to them as stratus clouds. They're often dense, dark, and rainy (or snowy) though they can also be cottony white clumps interspersed with blue sky.
The most dramatic types of clouds are cumulus and cumulonimbus, or thunderheads. Rather than spreading out in bands at a fairly narrow range of elevations, like other clouds, they rise to dramatic heights, sometimes well above the level of transcontinental jetliner flights.
Cumulus clouds are fair-weather clouds. When they get big enough to produce thunderstorms, they are called cumulonimbus. These clouds are formed by upwelling plumes of hot air, which produce visible turbulence on their upper surfaces, making them look as though they are boiling.
Just as it takes heat to evaporate water from the surface of the Earth, heat is released when water condenses to form clouds. In thunderheads, this energy can produce hail, damaging winds, lightning, torrential rain, and sometimes tornadoes.
As thunderheads reach high elevations, their tops encounter high winds that cause them to spread out sideways, earning them the nickname "anvil tops." They can reach elevations of 50,000 feet (15,000 meters).