Everybody is talking only about CO2.
Your question is unclear. I believe you are referring to crushing soda bottles to maintain its fizziness.
I'm going to need to talk about CO2, because I can't explain it without that. Soda is fizzy because of dissolved CO2, kind of like how sugar is dissolved in lemonade. Basically, when you open a soda bottle, drink some of the soda, and leave out some space, the dissolved CO2 escapes. By leaving more room in the bottle for the CO2 to escape into, you are allowing CO2 to leave the liquid soda. By crushing the bottle, you leave less space for the CO2 to escape into, so the CO2 stays in the liquid soda.