The amount of freshwater that enters the ocean through rain and rivers, and the extent of evaporation affects the salinity of an ocean.