Pumice is a common igneous rock that is extremely light and porous as a result of the many vesicles in its structure. These vesicles form as a result of the large quantity of gas that was dissolved in the magma from which the rock cooled.
As gaseous magma rises to the surface, the pressure around it gradually drops. This drop in pressure has an effect similar to the opening of a soda bottle, as it frees the trapped gas to percolate out from the rock in which it dissolved. As the gas expands, it forms pockets in the rock known as vesicles.