With the exception of the lungfish, fish do not have lungs. They possess gills instead. The lungfish has lesser lungs than other animals and cannot use them to breathe outside of water the way other animals do.
Fish absorb oxygen into their systems by moving water through their gills. The circulatory system of a fish passes large amounts of deoxygenated blood near to the water moving through the gills. The oxygen present in the water is then absorbed through the capillaries into the bloodstream, allowing the fish to respire.
Lungfish do not "breathe" in the same way that land animals do. Their lungs are honeycombed with capillaries and work much the same way as gills. Water passes near them and oxygen is absorbed into the bloodstream.