On the left is an atmospheric sounding profile taken at Wilmington, Ohio near the time this picture was taken. The red line represents the temperature of the atmosphere as you go up with height, and you can see that the temperature steadily decreases up to about 13 km.  The orange dotted line represents what happens to the temperature of a parcel of air from the surface if it is lifted upward (i.e. the updraft).  Notice that while its temperature decreases, it does not decrease as fast as the atmospheric temperature.  Since this parcel of air is warmer than its environment, it will continue to rise and form an updraft (think of a hot air balloon).  Eventually the temperature of the updraft becomes colder than the environment (at the equilibrium level) and the air will stop rising.  This represents the top of the cumulonimbus cloud.