Most species of aquatic snail have a comb-like gill. The oldest groups have two gills but the majority have lost one, to make room inside their spiral shell. As snails moved to the land, they swapped gills for a primitive lung, called the pallial cavity.
Some snail groups moved back to freshwater and a few re-evolved external gills. Others stay close to the surface and use a snorkel tube to gulp air now and again. Pond snails mostly breathe air but can flood their pallial cavity and use it as a basic gill when their pond freezes over.