Much like magnets, the inner workings of static electricity appear simple. This is, it turns out, misleading. So misleading, in fact, that scientists were fooled.
Back in grade school, you probably learned that static electricity happened when you rub two different objects together (like a balloon and your hair). In the process, one object loses its electrons, becoming positively charged, and the other object gains electrons, making it negatively charged. Once that happens, the positive object and the negative object will be attracted to one another—your hair will reach out for the balloon, the balloon will stick to your head.
But a recent paper is showing that this explanation doesn't quite explain everything about static electricity. There's a short, very visual, take on what's really going on at the Starts With a Bang blog. I'm going to quote the longer, more detailed perspective of Ars Technica's John Timmer:
... it wasn't until last year that some of the authors of the new paper published a surprising result: contact electrification (as this phenomenon is known among its technically oriented fans) can occur between two sheets of the same substance, even when they're simply allowed to lie flat against each other. "According to the conventional view of contact electrification," they note, "this should not happen since the chemical potentials of the two surfaces/materials are identical and there is apparently no thermodynamic force to drive charge transfer."
One possible explanation for this is that a material's surface, instead of being uniform from the static perspective, is a mosaic of charge-donating and charge-receiving areas. To find out, they performed contact electrification using insulators (polycarbonate and other polymers), a semiconductor (silicon), and a conductor (aluminum). The charged surfaces were then scanned at very high resolution using Kelvin force microscopy, a variant of atomic force microscopy that is able to read the amount of charge in a surface.
Surface before static charging (top) and after (below). Science The Kelvin force microscopy scans showed that the resulting surfaces were mosaics, with areas of positive and negative charges on the order of a micrometer or less across. All materials they tested, no matter what overall charge they had picked up, showed this mosaic pattern. The charges will dissipate over time, and the authors found that this process doesn't seem to occur by transferring electrons between neighboring areas of different charge--instead of blurring into the surroundings, peaks and valleys of charge remain distinct, but slowly decrease in size.
... So, what causes these charges to build up? It's not, apparently, the transfer of electrons between the surfaces. Detailed spectroscopy of one of the polymers (PDMS) suggests that chemical reactions may be involved, as many oxidized derivatives of the polymer were detected. In addition, there is evidence that some material is transferred from one surface to another.