What is static electricity?
A Static Charge is the transfer of an electron from a negatively charged object to a positively charged object in an electric field. It is a charge (not a current) because there is no flow of electrons, and there is no path for the electrons to flow along.
When non-conductive materials (plastic, rubber, and glass) are rubbed against each other, there is usually a transfer of electrons. This transfer results in an imbalance of charges between the two materials.
Here is a simple experiment you can do to see how static charge works
Balloon, tiny cuts of paper, and a wool blanket
Hover the inflated balloon over the pieces of paper. Nothing happens.
Now rub the balloon over the wool or blanket for a few seconds.
Hover the balloon over the pieces of paper again. This time the piece of paper will be attracted to the balloon and remain stuck on it.
Why did that happen?
Before the experiment, the charges in the balloon and paper were in balance. That is why it neither attracted nor repelled the pieces of paper.
By rubbing the balloon on the wool, the friction between the two surfaces (balloon and wool) produces heat energy. The energy in the balloon causes the negatively charged electrons to move more freely. Some electrons were discharged (jump) from your wool into the balloon. The wool now has less negative charges, and the balloon has more negative charges.
When you now place the balloon close to the pieces of paper, they attracted each other because the balloon is now negatively charged whiles the paper was positively charged.
Like charges repel each other and unlike charges attract each other.
Lightning is simply a powerful electric charge. When rain clouds form, the ice particles and water droplets in the clouds rub vigorously against each other, losing lots of electric charges. When other lighter clouds with more charges come into contact with the rainclouds, electrons are discharged (transferred into the rain clouds). The discharge produces a lot of heat and the spark that results in what we see as lightning.