The oceans appear to have been formed early in the Earth's history. As the planet heated up and became differentiated into three major zones (core, mantle and crust), large amounts of water vapour, along with other excess volatile materials, were released from the interior by volcanism and carried to the surface in lava. The water vapour escaped from the lava as hot clouds, which subsequently condensed to yield enough water to form the oceans.
The oceanic water contains a large number of dissolved salts. These salts result in the property of salinity. The average salinity of the oceanic water is about 35 per thousand which means that in 1000 grams of this water there are 35 grams of salts.
Chopra,P.S. (2002) Unique quintessence of General Studies.