How does carbon dioxide (CO2) get into the fermented food?

A very simple explanation, provided by Science Clarified is:

The chemical reaction that occurs in fermentation can be described quite easily. Starch is converted to simple sugars such as sucrose and glucose. Those sugars are then converted to alcohol (ethyl alcohol) and carbon dioxide.

Carbon dioxide creates the “fizz” in fermented foods, in addition to forcing oxygen up and out the airlock, creating healthy anaerobic conditions.

Creating kefir in a Pickl-It results in a carbonated, “champagne” style –

“The CO2 gas produced leads to fine flake” coagulation formation and also imparts a sparkling mouth feel to kefir. The presence of the gas bubbles in the drink has prompted some to refer to kefir as the champaign of fermented milk drinks.” Handbook of Fermented Functional Foods, p. 90

Excess carbon dioxide is a problem in some closed-fermentation systems, if it doesn’t have a means to escape, leading to possible explosions of the vessel. The Pickl-It airlock manages the carbon dioxide content, keeping it at a safe, even level.