Aquatic mollusks, such as clams and octopi, typically breathe using gills inside their mantle cavity. Terrestrial mollusks, such as land snails and slugs, breathe using their mantle cavity as a lung.
Almost all aquatic mollusks breathe with the aid of ctenidia, which are comblike gills in the mantle cavity. These are covered with small, hairlike structures called cilia. The rhythmic movement of the cilia draws water over the gill surface, enabling an aquatic mollusk to breathe. Terrestrial mollusks, unable to breathe with gills, have developed a network of capillary blood vessels on the pallial cavity, and the network functions as a simple lung. The lowering and rising of the pallial cavity's floor enables the process of breathing.