You've undoubtedly seen this trick on the internet or from your beloved Italian nonna: balance a wooden spoon across a pot of cooking pasta to prevent the water from boiling over and creating an unsightly, sticky mess all over your stovetop. It's almost magical, that's how easy it is.
The most popularly held belief is that the wooden spoon prevents heat from building up too much at the center of the pot, thus preventing the liquid from boiling too high—but this is not true.
A dry wooden spoon destabilizes the bubbles when they come into contact with its water-repelling surface. This makes the boiling water retreat.
Second, bubbles and foam created from boiling water are filled with steam (aka water in the form of a gas or vapor). If the bubble touches something whose temperature is below 100°C (212°F), the steam will condense (change back into a liquid) and break the surface of the bubble.
The wooden spoon, being considerably cooler than 100°C, thus works to break the bubbles and make the foam retreat.
While this trick definitely works, it does have some drawbacks. At some point, your wooden spoon will heat up and the water will rise no matter what. And don't try using a metal spoon in lieu of a wooden one—metals conduct heat much more quickly.
One good quick fix: you can blow on the surface of a boiling pot and the foam will retreat, since your breath is most likely well below 100°C, temperature-wise.
If you keep using the same wooden spoon over a pot of boiling water, it will warp from the moisture and heat. So be sure to keep a couple of spoons on rotation, or at the very least, keep an eye on your boiling water so the spoon doesn't stay up there very long.
Over at HellaWella, user Mark Smokeyb keeps a can of PAM or another nonstick cooking spray handy. He sprays the inside of the pot or pan above the water to stop boiling water from climbing too high. In principle, this should work quite well, since the grease discourages water from sticking to the surface of the pot. It'll also help keep your pasta from sticking to the pot.
Have you tried these or any other techniques to stop water from boiling over? Let us know what worked and what didn't.