Most fish use gills to breathe. Gills are structures that allow water to pass through very fine channels. Next to these channels are blood vessels, with very thin walls that let the oxygen move from the water into the blood.
The above image is a close-up of one of the thin channels in the fish's gills. The channel that the water flows through is surrounded by blood vessels, that flow in the opposite direction. The oxygen leaves the water, and goes into the blood. From there, it is carried all around the body of the fish!
Like humans, fish have water-proof skin. This means they can't breathe through their skin like some other animals, like amphibians. Lungs don't work well in water, because it takes too much energy to move the water in and out of them. Instead, fish use their gills to get oxygen. Fish have a heart and circulatory system that is similar to that of humans, and it carries oxygen around to all the cells, just like in our bodies!
If there's oxygen in the water, then why can't humans breathe water? Because oxygen has to move from the water into our blood, which is much slower than when oxygen moves from the air into our blood. Gills are specialized to handle this slow movement, but our lungs can't pick up oxygen from the water fast enough to keep us alive, which is why we drown if we try to breathe water.