Other answers have suggested taking off the lid when your pot boils, lowering the temperature, stirring, the wooden spoon trick, and adding fat (oil). These are all helpful suggestions, but one special case comes to mind that's worth mentioning. That case would be cooking rice in an inexpensive rice cooker, of the type that's vented through the lid and has no real temperature control. They look like this:
If the contents of the bowl produce a lot of bubbles, they can block the vent. When the vent is blocked:
- Air doesn't escape as quickly, so there's more pressure and less cooling;
- Lack of temperature control combined with the above means the bowl gets hotter;
- Hotter bowl creates more bubbles.
End result can be a pretty big mess as the bubbles start to leak out through the lid and around the rim. You can get a surprisingly big puddle on your countertop this way, and water overflowing on an electric appliance is never a good idea.
But with the rice cooker, you can't really take the lid off or it won't cook right. So you can't use the spoon trick or stir to break up the bubbles, either. And there's no way to control the temperature on these models. The one thing that does help is adding fat, but sometimes you don't want to add fat or it's not helping enough.
So, what can you do to stop this other than cook several smaller batches or buy a bigger/more expensive rice cooker?
The answer is simple: rinse your rice thoroughly. This is specifically a problem with white rice because of all the loose starch that's formed during the milling process, when the bran and germ (the parts that remain in brown rice) are removed. Depending on the type of white rice, more or less starch might be created; depending on the brand, more or less might remain on the packaged product. This loose starch essentially turns the water in the cooker into a thin paste, which bubbles like crazy. If the rice is starchy enough you can even have issues with the cooker half full (or less).
If you prefer the texture of the un-rinsed white rice, you could try only rinsing it a little; otherwise, you want to rinse until the water runs reasonably clear.
Of course, you wouldn't want to rinse arborio rice for a risotto, but if you're making risotto in a rice cooker I think we have bigger problems that need to be addressed...