The ocean is non-black because fluids capable of scattering a given wavelength glow when illuminated by that wavelength. Particles (including tiny particles like molecules of H2O, but also larger particles like suspended minerals etc) scatter light, and multiple scatterings result in a diffuse glow. Imagine giving a million people randomized directions that read "turn $x_1$ degrees, then go $y_1$ meters, then turn $x_2$ degrees, then go $y_2$ meters, then turn...". If most $x_n$ are small, most will keep going more or less the direction they started in, but a few of them will end up going in any given direction, including a few coming back towards you. Each instruction to turn is like a scattering event, and each instruction to go a certain distance is a path in which there were no scattering events.
If water was colorless, one might expect wavelength-dependent Rayleigh scattering to give the ocean the same range of colors as the sky, and for deep sea scenes to be lit in sunset hues.
However, water is itself blue/cyan in color: water molecules transmit all colors of visible light pretty well, which makes small amounts of water appear perfectly colorless, but they absorb a little less blue and a little more of the other visible colors. The larger-wavelength red, orange, and yellow light is all absorbed by the time it has traveled a few tens of meters through water in whatever path. The blue and green wavelengths that can penetrate farther provide the azure or cyan glow that is characteristic of especially underwater photographs. I'm not sure why it's sometimes azure and sometimes cyan, although I imagine it has to do with scattering profiles for different mixtures of suspended particulates.
Of course, the surface of water is reflective, so from the surface most of the color is reflected color.