The lighter air rises and cools due to its expansion in the lower pressure at higher altitudes.
The size and strength of thermals are influenced by the properties of the lower atmosphere (the troposphere).
The condensing water releases latent heat energy allowing the air to rise higher.
Very unstable air can reach the level of free convection (LFC), rising to great heights, condensing large quantities of water and forming convective clouds causing showers or even thunderstorms.
Thermals are also seen on the sun, typically forming hexagonal convective prisms (Bénard cells).