After the planet Earth came into existence, and after a lapse of time, there were consistent rains on the planet. Salt which was on the surface and in subsurface layers of the planet, got dissolved as the solution of salt water made its long journey to lower gradients of lands and finally into big depressions - which finally got filled with the salt water. These big depressions are what we now call oceans, seas, gulfs, and bays.
With the removal of almost all the salt, the present earth's surface is almost devoid of salt, and from then on, vegetation came into existence.