Static Electricity
Static electricity is a buildup of electric charge on the surface of an object, usually from rubbing, that stays put until it discharges.
Definition
Static electricity is electric charge that builds up on something and stays there instead of flowing away, often from rubbing two things together, and the shock felt after shuffling across a carpet and touching a doorknob is that static electricity finally moving, jumping across the path the doorknob gave it. It is an imbalance of charge on an object's surface, produced when electrons move between materials through friction, conduction, or induction, with the charged object attracting or repelling others since like charges repel and opposite charges attract, and the charge stays on insulators until it discharges, sometimes as a visible spark. Formally it is a net charge $Q$ governed by Coulomb's law, $F = kq_1q_2/r^2$ with $k = 8.99 \times 10^9\ \text{N}\cdot\text{m}^2/\text{C}^2$; charge separation by contact (the triboelectric effect) depends on the materials' relative electron affinities, and on a conductor excess charge concentrates at sharp points, where the field is strongest, so when the field exceeds the dielectric strength of air, about $3 \times 10^6\ \text{V/m}$, the air ionizes and sparks discharge the object, and an isolated sphere of radius $R$ at potential $V = kQ/R$ has capacitance $C = 4\pi\varepsilon_0 R$.
Example
Rubbing a balloon on hair makes it stick to a wall, and rubbing a plastic rod with wool transfers electrons to the rod, leaving it negative and the wool positive, so bringing the rod near a thin stream of tap water bends the stream toward it as the rod pulls the positive side of the water molecules closer. A person walking on carpet acquires about $-1\ \mu\text{C}$ of charge, and with a body capacitance of roughly $100\ \text{pF}$ that gives a potential of $V = Q/C = 10^{-6}/10^{-10} = 10{,}000\ \text{V}$, enough to jump a $3\ \text{mm}$ gap, though the stored energy is only $\tfrac{1}{2}CV^2 = 5\ \text{mJ}$, which is why the shock stings but does no harm, even as the same tiny spark can destroy a computer chip.
Key Insight
Static shocks are worse in winter because dry air is a better insulator, while humid summer air lets charge leak away quietly before it can build up enough to spark. Lightning is static electricity at planetary scale: ice crystals and graupel rubbing inside a thundercloud separate charge until the field across kilometers of air exceeds breakdown, and a spark carrying tens of thousands of amperes bridges the gap.