We are getting shock due to an imbalance between negative and positive charges in our body.This is called static electricity.Most of the time positive and negative charges are balanced in our body.
Static electricity is formed when we rubbing of certain materials against one another can transfer negative charges.These negative charges will be there in your body until discharged.
Now our body is imbalanced ,in this situation when we touch any object extra negative charges are flowing into another object.Hence we are getting shocked.
Technical Explanation
All physical objects are made up of atoms.There are three important aspects of atoms
- Photons- positive
- Electrons-negative
- Neutrons-no charge
Protons and electrons are coupled tightly but electrons are loosely coupled. This loosely coupled electrons can move from one atom to another atom.
Movement of this electrons creates static electricity in another object and this is released by circuit nothing but neutralizing.