A quick tap on the top of a freshly-opened beer brings up a massive wave of fizz. This video lets you see how that happens, and tells you what’s happening inside the bottle.
Once a beer is opened, the major pressure-release has already happened, so why does tapping the top with another bottle of beer make it erupt in foam? The gentle tap isn’t just a simple – or single – jolt. When one bottle taps the top of another, it creates a compression wave. That wave travels between top of the liquid and the bottom of the bottle, and it does so several times.
On the way, it creates chaos. Existing bubbles are compressed and expanded. In the process they split and, once again, expand. This keeps happening until the carbon dioxide in their general area is shaken out of the liquid and traveling rapidly towards the surface. Through this process, all of the carbon dioxide that should be released slowly as the beer slowly flattens over the course of an hour comes out in a few seconds and you get a fizz explosion.
[Source: Fuck Yeah Fluid Dynamics]