Lightning is a bright flash of electricity produced by a thunderstorm. All thunderstorms produce lightning and are very dangerous. If you hear the sound of thunder, then you are in danger from lightning. Lightning kills and injures more people each year than hurricanes or tornadoes; between 75 to 100 people. However the probabilities of getting struck by lightning are relatively low unless holding sharp metallic objects or standing in open fields.
Lightning is the result of static electricity, and is essentially an electric current. Many small bits of ice (frozen raindrops) bump into each other as they move around in the air within a thundercloud way up in the sky, this friction results in the creation of electric charges. After a while, the whole cloud fills up with electrical charges. The positive charges or protons form at the top of the cloud and the negative charges or electrons form at the bottom of the cloud. Since opposites attract, the negative charges at the bottom of the cloud pull positive charges from the ground upwards. The grounds positive electrical charge concentrates around anything that sticks up, such as mountains, people, or single trees. The charge coming up from these points eventually connects with a charge reaching down from the clouds and resulting in a lightning strike. Have you ever rubbed your feet across carpet and then touched a metal door handle? If so, then you know that you can get shocked; lightning works in the same way, only their charges are significantly larger.
Thunder is caused by lightning; when a lightning bolt travels from the cloud to the ground it actually opens up a hole in the air, called a channel, once the lightning is gone the air collapses back in and creating a sound wave that we hear as thunder. The reason we see lightning before we hear thunder is because light travels faster than sound! It is likely that you can see lightning from very far away, whereas you can only hear thunder when close to a lightning storm, how close? Well you can calculate this easily, next time you see a storm, count the number of seconds between when you see the lightning and hear the thunder. Take the number of seconds and divide by 5 and that will tell you how far away the storm is in miles. For example if it takes 20 seconds for you to hear the thunder after seeing the lightning then (20/5 = 4) then the storm is about 4 miles away.