When the cumulonimbus penetrates the "freezing level" (-10 to -20), portions of the cloud become "electrified" or become centers of electric charge differences. When the differences become large enough, the following "classic" lightning can occur. Since this occurs when the cloud penetrates the freezing level, production of hail within the cloud and lightning occurrence seem to be related.
cloud to ground lightning in SF
sheet lightning - lightning illuminating cloud between observer and lightning stroke with stroke not visible to observer. Originating stroke can be cc, cg, or ic.
heat lightning - lightning visible at night while skies are clear overhead. Originating cumulonimbus (usually on the horizon or surrounding mountains) not visible. Since thunderstorms are chiefly a warm season phenomenon, the "old wives' tale" about bolts of lightning in clear sky on hot nights started. Originating stroke can be cc, cg, or ic.
ball lightning - electrical discharges roughly circular in shape and having an approximate diameter on the order of meters to 10 meters. Associated with the everest thunderstorms. Poorly documented (no pictures) and understood. Often misidentified as UFO.
Lightning stroke "superheats" air along its path to 6000 to 30000 C. Air explosively expands sending a wave of low frequency and high amplitude in all directions. Perceived by ear as sound with frequency of around 20 cycles/sec (analagous to lowest note on organ).
Count the number of seconds between lightning flash and thunder. Since sound travels approx. 1100 feet per second, divide the number of seconds by 5 to get approximate distance of stroke from you. (e.g., 5 sec = 1 mile distance)
peal -- sound from nearest portion of stroke reaches your ear first. Since the stroke may be as much as 5 miles long, it may take over 20 seconds for the last portion of sound to reach your ears.
clap -- sound
arrives simultaneously. Cloud to ground strike very close, usually
within 100 meters.