Three things are needed for a thunderstorm to form:
Cumulonimbus clouds are often referred to by the trigger they as associated with. These cumulonimbus types include:
Thunderstorms that are a result of convection. The sun heats the surface (solar radiation) and the warm, humid air rises in an unstable atmosphere.
Thunderstorms that form along a front after cold air forces a warmer airmass to rise rapidly.
Thunderstorms that develop after air is forced up a mountainside. These cumulonimbus usually have the help of convection as well.
Thunderstorms that develop in a convergence, where two airmasses are colliding head-on and the air is forced to rise.