How do you get static electricity? How does that work?
No one knows the precise physical mechanism, but there’s something called the Triboelectric series which tells you which materials are likely to generate it when rubbed (Trib- in this case being the prefix for rubbing). The energy involved *shouldn’t* be enough to strip electrons, far from it, but for unknown reasons that isn’t the case. The leading theory involves the very not ELI5 idea that similar atoms can sort of “share” their electrons, and when moved apart those electrons stay with one or the other atom.
I’m not sure why this is under planetary science, but basically you’re picking up a charge from something you touch and then it discharges when you touch something with a different charge, kinda like tiny lightning.
Think about when you walk on carpet and then get shocked by a doorknob. Shuffling across the carpet generates friction that encourages electrons to move, building up electric charge on the surface of both the carpet and your skin. The electrons don’t like this, they always want to be neutral. You then go and touch a doorknob made of metal, which is infamously conductive, and that static electricity discharges so that it can neutralize that charge you’ve picked up. Sometimes you don’t even have to touch the doorknob, the electrons can jump through the air in a flash of tiny lightning if your hand is close enough.
Electrons aren’t as securely attached to their atoms as you might think. Certain atoms have configuration of electrons that leave one or more electrons only loosely attached. At the same time, other atoms might have space for that electron. So when those two atoms come close enough to one another the electron will snap over to the atom with space. Over time this can happen many many many times. However as the atoms themselves are gaining that electron as a whole and filling that space the material didn’t need the electrons so it is building up a negative charge while the other material is losing electrons it needed overall so it builds a positive charge. If that charge is large enough the electrons can jump across the gap in an electrical arc to balance the materials out again.
This is what happens in thunderstorms. Dust, water, and air molecules jostle into each other in such a way that negative charge builds up close to the ground while positive charge builds up in the cloud. Eventually the charge is so great that the air close to the ground and the cloud doesn’t provide enough resistance and the charge arcs down in a blinding flash of lightning.