Most fish exchange gases using gills on either side of the pharynx. Gills consist of threadlike structures called filaments. Each filament contains a capillary network that provides a large surface area for exchanging oxygen andcarbon dioxide. Fish exchange gases by pulling oxygen-rich water through their mouths and pumping it over their gills. In some fish, capillary blood flows in the opposite direction to the water, causing countercurrent exchange. The gills push the oxygen-poor water out through openings in the sides of the pharynx. Some fish, like sharks and lampreys, possess multiple gill openings. However, bony fish have a single gill opening on each side. This opening is hidden beneath a protective bony cover called an operculum.
Fish from multiple groups can live out of the water for extended time periods. Amphibious fish such as the mudskipper can live and move about on land for up to several days, or live in stagnant or otherwise oxygen depleted water. Many such fish can breathe air via a variety of mechanisms. The skin of anguillid eels may absorb oxygen directly. The buccal cavity of the electric eel may breathe air. Catfish of the families Loricariidae, Callichthyidae, and Scoloplacidae absorb air through their digestive tracts. Lungfish, with the exception of the Australian lungfish, and bichirs have paired lungs similar to those of tetrapods and must surface to gulp fresh air through the mouth and pass spent air out through the gills. Gar and bowfin have a vascularized swim bladder that functions in the same way. Loaches, trahiras, and many catfish breathe by passing air through the gut. Mudskippers breathe by absorbing oxygen across the skin (similar to frogs). A number of fish have evolved so-called accessory breathing organs that extract oxygen from the air. Labyrinth fish (such as gouramis and bettas) have alabyrinth organ above the gills that performs this function. A few other fish have structures resembling labyrinth organs in form and function, most notably snakeheads, pikeheads, and the Clariidae catfish family.
Breathing air is primarily of use to fish that inhabit shallow, seasonally variable waters where the water's oxygen concentration may seasonally decline. Fish dependent solely on dissolved oxygen, such as perch and cichlids, quickly suffocate, while air-breathers survive for much longer, in some cases in water that is little more than wet mud. At the most extreme, some air-breathing fish are able to survive in damp burrows for weeks without water, entering a state of aestivation (summertime hibernation) until water returns.
Tuna gills inside of the head. The fish head is oriented snout-downwards, with the view looking towards the mouth.
Air breathing fish can be divided into obligate air breathers and facultative air breathers. Obligate air breathers, such as the African lungfish, must breathe air periodically or they suffocate. Facultative air breathers, such as the catfish Hypostomus plecostomus, only breathe air if they need to and will otherwise rely on their gills for oxygen. Most air breathing fish are facultative air breathers that avoid the energetic cost of rising to the surface and the fitness cost of exposure to surface predators.