The thermals expand and cool as they rise and eventually reach the dewpoint. The type of cloud that then forms depends entirely upon the way in which the temperature of the surrounding air varies with height and upon whether the air is stable or unstable. Convection generally produces cumuliform clouds but may produce stratocumulus and altocumulus. In certain layers, known as inversions, temperature actually increases with height. A major inversion, called the tropopause, defines the boundary between the troposphere and the overlying stratosphere.
Air conducts heat poorly.
Once away from the surface a parcel of air cools or warms almost independently of it surroundings. The rate at which rising air cools depends on the amount of water vapour present. Dry air cools at around 10 C per km. Because heat is needed to evaporate water the reverse process, condensation, releases this latent heat. Once air has cooled to the dewpoint, cloud droplets form and the heat released reduces the rate of cooling.