What is happening when boiling vegetables on a stove and the lid pops up?

The lid of the pot is popping up because of the increase in steam pressure inside the pot. As the vegetables boil, they release steam. This steam builds up inside the pot and pushes against the lid. When the pressure becomes too great, the lid pops up to release the steam.

This is why it is important to leave a small gap between the lid and the pot when boiling vegetables. This allows the steam to escape and prevents the lid from popping up.