Then the kinda-liquid-kinda-gas can drift out of the solid molecular structure, and be replaced by air, so you have a porous, lightweight material that retains its shape.
They have a system of external openings called spiracles, that lead to a branching network of tubes called tracheae, that diffuse oxygen through their bodies.