Water is actually transparent and clear. However, water appears blue because of the scattering and absorption of light waves.
The color perceived by humans is the color that an object reflects. The ocean looks blue because red, orange, and yellow wavelengths of the visible light spectrum are largely absorbed by the ocean waters. These colors are associated with long wavelengths of the visible light spectrum. Wavelengths within the blue spectrum of visible light are reflected the most by the water. Blue has a much shorter wavelength.
In shallow waters, the light reflects off of the bottom of the ocean floor. Thus, the blue colors of the ocean waters along the coastline are intensified. The reflection in coastal waters is also intensified by suspended particles that come from the runoff of rivers and the churning of the waters due to tides, waves, and storms.