Lightning is a phenomenon that has been occurring for thousands of years, but today most people don't know a whole lot about how or why it happens. To put it simply, lightning is the result of a buildup of electrical charge that happens in clouds created from water vapor. Research suggests that a strong negative charge tends to build up toward the bottom of clouds, and most of the positive charge located in clouds collects nearer to the top portion of them.
A "step leader" then begins to be formed as excess electrons start their journey down from the ground. This leader forks off in different directions for a reason that is unknown at present, but is suspected to be the differing conductivity of different particles in the air. The path that is being formed here is not the lightning itself, but in fact is only the pathway that it will eventually follow. As the negatively charged reach down to the earth, the amount of positive charge on the portion of the earth will begin to increase, and this charge will eventually start to travel up to the tops of buildings, trees, and all other objects in the area, toward the negative charge in the air that is gathering. This upward rising charge is known as a "streamer."
Once the streamer comes into contact with the leader, the pathway for the lightning is completed and it can make a descent from its cloud. These lightning bolts can travel at speeds up to 50,000 miles per second and can also contain currents in the tens of thousands of amperes and voltages in the hundreds of millions of volts, making them incredibly dangerous. The sound that accompanies lightning is a result of the large and extremely fast flow of charge, which heats the air and causes it to rapidly expand. This expansion creates a shock wave that we know as thunder.