Fish have gills. The gills work exactly the way human lungs
work, except that oxygen is absorbed from water instead of air. When a fish opens
and closes its mouth, it is actually pumping water back through the gills and
is thus breathing. The fish allows water which contains dissolved oxygen, to
pass into its mouth and over its gills. These are rich in blood vessels and
also have a large surface area. The oxygen from the water passes into the blood
of the fish by diffusion, and waste carbon dioxide passes out the same way.
As long as there is plenty of oxygen dissolved in the water,
the fish can extract enough through its gills to gain enough oxygen for
cellular respiration. Fish do get in trouble if the oxygen content of the water
falls. When fishes are taken out of water, they suffocate, because their gills
collapse and they are unable to absorb oxygen.