The ocean is blue because water absorbs colors in the red part of the light spectrum.
Like a filter, this leaves behind colors in the blue part of the light spectrum for us to see.
The ocean may also take on green, red, or other hues as light bounces off of floating sediments and particles in the water.
The ocean is very, very deep; light can only penetrate so far below the surface of the ocean.
As the light energy travels through the water, the molecules in the water scatter and absorb it.
At great depths, light is so scattered that there is nothing left to detect.
Water molecules scatter blue wavelengths by absorbing the light waves, and then rapidly re-emitting the light waves in different directions.
That is why there are mostly blue wavelengths that are reflected back to our eyes. Sometimes oceans look green.
In the natural world you often see water that is definitely not clear. Sediment and organics color natural water shades of brown or green.