Pumice forms when super heated, highly pressurised lava is violently ejected from a volcano. The porous nature of pumice occurs because of simultaneous rapid cooling and rapid depressurization. The depressurization creates bubbles by lowering the solubility of gases (including water and CO2) that are dissolved in the lava, causing the gases to rapidly exsolve. The simultaneous cooling and depressurization freezes the bubbles in the matrix. Submarine eruptions can produce vast quantities of rapidly cooled pumice which floats to the surface creating shipping hazards.