The occurrence of more or less horizontal water layers in the sea as a consequence of differences in water density (i.e., in salinity or temperature).