Watch this video to learn how a can of aerosol cheese works

YouTuber Parttwos says, "I cut open the cheese can because I always wanted to know what was inside one of them and how did it work. Now I know."

And now you know. The top part of the can contains delectable semi-liquid cheese food product. The bottom part of the can contains pressurized gas. Separating the two is a plastic piston. When you press the valve, the pressurized gas pushes on the piston, and the cheese squirts out of the valve. Shaving cream works the same way.