In aquatic organisms, gills are a respiratory organ for the extraction of oxygen from water and for the excretion of carbon dioxide.
Many small aquatic animals absorb oxygen through the surface of their bodies in general, but more complex forms have localized respiratory organs formed to present an adequate surface area to the external environment. They are usually thin plates of tissue or slender tufted processes and, with the exception of some aquatic insects, they contain blood or coelomic fluid which exchange gases through their thin walls. In the insects a unique type of respiratory organ is used, the tracheal gill, which contains air tubes. The oxygen in these tubes is renewed through the gills.
Gills are developed in sea stars and sea urchins (Echinoidea) as thin protuberances on the surface of the body containing diverticula of the water vascular system . In the crustaceans, molluscs and some insects, they are tufted or plate-like structures at the surface of the body in which blood circulates. The gills of other insects are of the tracheal kind and also include both thin plates and tufted structures, and in the larval dragon fly the wall of the caudal end of the alimentary tract (rectum) is richly supplied with tracheae as a rectal gill. Water pumped into and out of the rectum provide oxygen to the closed tracheae.
Gills of vertebrates are developed in the walls of the pharynx along a series of gill slits opening to the exterior. Water taken into the mouth passes out of the slits, bathing the gills as it passes. Some fish utilize the gills for the excretion of electrolytes. In some amphibians the gills occupy the same position on the body but protrude as external tufts. In most species a countercurrent exchange system is employed to enhance the diffusion of substances in and out of the gill, with blood and water flowing in opposite directions to each other. The gill slits of fish are believed to be the evolutionary ancestors of the Eustachian tubes.
Gills' large surface area tends to create a problem for fish seeking to regulate the osmolarity of their internal fluids. Saltwater is less dilute than these internal fluids; consequently, saltwater fish lose large quantities of water osmotically through their gills. To regain the water, they drink large amounts of seawater and excrete the salt. Conversely, freshwater is more dilute than the internal fluids of fish, so freshwater fish gain water osmotically through their gills. They eliminate the water through their urine.