Static electricity is the imbalance of electric charges on the surface or within a material or between materials.
When one object is in a negatively charged state, the other becomes positively charged when they are brought closer, and the constant rubbing of these two objects creates an imbalance of electrons and a buildup of self-produced current producing static electricity.
We can observe this in both conductors and insulators. For example, Lightning or even sticking of the hair to the wool of a hat.
This phenomenon is more common in dry season as moisture prevents the transfer of electrons.