The friction of drafts in clouds produces a negative charge at the bottom of a cloud and a positive charge at the top.
Because opposite charges attract each other, the negative charges attract the positive charges on the ground. When the charging electrical force between the cloud and ground reaches 3 million volts, the air becomes a conductor (a substance through which electricity travels).
The electrical current shoots down from the cloud, strikes Earth, and Earth sends the electrical charge back up to the cloud. Offshoots of a lightning bolt form wherever the air is sufficiently charged to conduct the electricity.
Lightning is often accompanied by a ripping sound. Imagine the static electricity when you pull off a sweater. It crackles. That is the same sound of electricity that lightning makes, only in much greater magnitude.
A sulfurous smell is associated with lightning. The smell results from chemical reactions in the air, creating ozone and nitrous oxides.