One thing about chemicals is that, once they react in certain ways, they form compounds that are nothing like the original elements. For example, if you react carbon, hydrogen and oxygen together one way you get glucose (C6H12O6) (see How Food Works). If you react them together another way you get vinegar (C2H4O2). If you react them another way you get fat (see How Fat Works). If you react them another way you get ethanol (C2H5OH). Glucose, fat, ethanol and vinegar are nothing like each other, but they are all made from the same elements.
In the case of hydrogen and oxygen gas, if you react them together one way you get liquid water (H2O). The reason we cannot breathe liquid water is because the oxygen used to make the water is bound to two hydrogen atoms, and we cannot breathe the resulting liquid. The oxygen is useless to our lungs in this form.
The oxygen that fish breathe is not the oxygen in H2O. Instead, the fish are breathing O2 (oxygen gas) that is dissolved in the water. Many different gases dissolve in liquids, and we see an example all the time in carbonated beverages. In these beverages, there is so much carbon dioxide gas dissolved in water that it rushes out in the form of bubbles.
Fish "breathe" the dissolved oxygen out of the water using their gills. It turns out that extracting the oxygen is not very easy -- air has something like 20 times more oxygen in it than the same volume of water. Plus water is a lot heavier and thicker than air, so it takes a lot more work to move it around. The main reason why gills work for fish is the fact that fish are cold-blooded, which reduces their oxygen demands. Warm-blooded animals like whales breath air like people do because it would be hard to extract enough oxygen using gills.
Humans cannot breathe underwater because our lungs do not have enough surface area to absorb enough oxygen from water, and the lining in our lungs is adapted to handle air rather than water. However, there have been experiments with humans breathing other liquids, like fluorocarbons. Fluorocarbons can dissolve enough oxygen and our lungs can draw the oxygen out -- see the last link below for some fascinating details!
Here are several interesting links: