Dear student,
Ocean's salts are derived from the processes like breaking up of the rocks by weathering and erosion. These rocks contains salts, therefore ocean water is salty. Plants adapted to Salinity as they are able to breakdown salt into chlorine and sodium ions. Some plants stores this salt and later dispose it via their respiratory process.
Another adaptation of marine plants is that some of them living close to the seashore have succulent leaves where these plants store water. This water is used by plants to dilute the saltwater concentration.
Regards.