system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does carbonation work? Why does it not dissipate immediately after opening your beverage?
gpt
Carbonation is basically carbon dioxide CO2 dissolved in water.

CO2 naturally dissolves in water somewhat, but to make a fizzy drink it's forced in at high pressure.  Increasing the pressure allows (forces really) more CO2 to dissolve.

When you open a bottle or a can the pressure reduces and the CO2 can begin to escape.  That's why you get the noise.

Dissolved CO2 can't instantaneously detach itself, since this requires energy.  Notably, since most fizzy drinks are consumed cold there is a reduced amount of energy available.  So, it will release over time.  The reason it'll release quickly if you drink half, replace the cap and give it a really good shake is that you're giving it the energy needed to release.

But, not all the CO2 will release even in a 'flat' drink.  If you drink a thoroughly flat carbonated drink it will still taste fizzy.  That taste is dissolved CO2.