Types
Ocean water or salt water contains a variety of dissolved salts. While sodium chloride is the leading component in seawater, other salts like magnesium sulfate are present in measurable quantities as well.
Function
When an ionic compound like sodium chloride dissolves in water, the ions dissociate and the attraction between them is replaced by attraction with water molecules. These atoms have a higher atomic mass than the oxygen or hydrogen that make up water molecules, so adding the ions to the solution increases the amount of mass in a given unit of volume. Since density is mass divided by volume, water with salt in it is more dense than pure water.
Considerations
The saltier the water, the more mass per unit volume and thus the more dense the solution. Temperature, however, also plays a role. It is possible, for example, for masses of seawater with slightly different salinities to have the same density, depending on the temperature of each.