It's very common to boil something (e.g. pasta) and then after few minutes you hear the hissing sound of water boiling over and your whole kitchen is a mess.
How do you stop the water from boiling over?
Most of the time when you need boiling water you don't need to keep it at a rolling boil. I've found that the best way to keep things from boiling over is to reduce the heat slightly, so while the water is still boiling it's not quite so vigorous.
That, or you can try using a larger pot when cooking.
Here is a method that involves butter that may help the problem:
Rub a bit of butter around the top of the pot. You will need about 1/2 tsp, more shouldn't hurt the food. Some people add it directly into the pot, but it may work either way.
How do I stop my pans boiling over?- In this answer it says you can use oleo, butter, or crisco. And to have at least a 1-2 inch ring.
The differences shouldn't matter as long as you add at least 1/2 inch.
I agree with not keeping the water at a rolling boil, if it doesn't need to be, and if you get into a really big pinch, and the recipe can take it, throw in some salt. The salt increases the water's boiling point and will stop the water from boiling.
The most common life hack is to put a wooden spoon across a boiling pot of water to keep it from boiling over. Set it and forget it!
Why does it work?
The theory behind how does it works is that the wooden spoon breaks a surface tension of the bubbles and it's also not a very good conductor of heat, so it helps to cool the bubbles off when they reach the surface.
In other words, when the foam bubbles up it will eventually meet the spoon. The foam is thermodynamically unstable, which means when the bubbles reach the spoon they will burst, breaking the layer of foam and sending all of the bubbles collapsing down again. [gizmodo]
Alternatively just use the bigger pot with higher walls to climb.
Here are few videos demonstrating a wooden spoon method:
At the moment that it starts to boil over, lift it from the heat. This will usually stop the boilover. If possible, turn the heat down before you set it back on the heat again.
If simply lifting it doesn't work, try blowing on it as you would blow on a hot cup of coffee. This stops the boilover (and will keep it stopped as long as you blow) giving you time to move the pot, turn the heat down, or otherwise deal with the issue. You may think that it won't work but next time you face a boiling-over pot, try it!
I keep a wooden clothespin in the kitchen. When I make pasta or rice, I clip the clothespin to the lid, creating a small gap between the lid and pan. With the lid closed, the pan would boil over. With the pin in place, the boilover doesn't occur (at the same heat setting).