Change in Physical State. Heat also affects how molecules interact with each other. Heating a solid above a certain temperature will cause it to melt to form a liquid; further heating causes this liquid to boil to form a vapor.
When water is in its solid state (ice) , the water molecules are packed close together preventing it from changing shape. Ice has a very regular pattern with the molecules rigidly apart from one another connected by the hydrogen bonds that form a crystalline lattice.
When warmed, the dry ice sublimates, meaning the solid makes the transition directly to carbon dioxide gas rather than melting into a liquid. This process occurs much more quickly in water than in air. As the dry ice sublimates, the carbon dioxide vapor is caught inside the bubble solution.