Fish physiology is the scientific study of how the component parts of fish function together in the living fish. It can be contrasted with fish anatomy, which is the study of the form or morphology of fishes. In practice, fish anatomy and physiology complement each other, the former dealing with the structure of a fish, its organs or component parts and how they are put together, such as might be observed on the dissecting table or under the microscope, and the later dealing with how those components function together in the living fish.
Most fish exchange gases using gills on either side of the pharynx (throat). Gills are tissues which consist of threadlike structures called filaments. These filaments have many functions and "are involved in ion and water transfer as well as oxygen, carbon dioxide, acid and ammonia exchange. Each filament contains a capillary network that provides a large surface area for exchanging oxygen and carbon 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.
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 a labyrinth 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.