Pumice is an igneous rock formed by the rapid cooling and depressurization of volcanic magma with a high gas content. It is characterized by a large amount of vesicles formed from gas bubbles in the magma.
Gases found in magma are highly pressurized and typically form liquid solutions. When the magma erupts, rapid depressurization causes the gases to vaporize and form a large amount of pockets in the frothy molten rock. The magma experiences rapid cooling and hardens, which causes the gas to become trapped in numerous vesicles, creating a highly porous igneous rock. These vesicles cause pumice to typically be extremely lightweight due to its low density.