Cloud Formation Due to Surface Heating
Some clouds form due to the heating of the Earth's surface. First, the Sun heats the ground, which then heats the air. This warm air is lighter and less dense than the surrounding air, so it begins to rise. When this air rises, it expands as it encounters the lower pressures existing at higher levels in the atmosphere. Anytime air expands due to a drop in pressure, it also gets cooler. So when the rising air expands it also cools.
The cooling air that is rising is no longer able to hold all of the water vapor it was able to hold when it was warm. This extra water vapor begins to condense out of the air parcel in the form of liquid water droplets. As the air parcel rises higher and higher, it continues to expand and get cooler, and more moisture condenses out of it.
Eventually the air rises high enough that the surrounding air in the atmosphere is the same temperature as the cooled air. This is called the equilibrium temperature. When equilibrium is reached, the air parcel stops rising and enough moisture has condensed out of it to form a cloud. The types of clouds that form from the process of surface heating are cumulonimbus (and associated mammatus clouds), cumulus, and stratocumulus.
In contrast to surface heating, the cooling of the Earth's surface leads to the development of fog and stratus clouds.