It is estimated that the oceans formed about 500 million years ago. A lot of the salt entered the oceans during their formative years. As igneous rocks cooled below the oceans, they released a lot of the salt into the oceans. More salt entered the oceans as rock and sediments on the ocean floor dissolved. Still more salt entered the ocean through the erosion of the land. As mountains gradually break down and rains wash over the land, naturally occurring salts of the Earth are washed into the ocean. As water from the ocean evaporates, the salts are left behind, so the ocean gets more salty with time.

http://www.strangequestions.com/question/709/Why-is-there-salt-in-the-oc...