Why and how is the sea water salty? Well, to put it simple, - rivers erode minerals from rocks and soil throughout their journey and finally deposit them into seas. These elements include sodium and chlorides, which, when combined, become salt.
For a bigger picture, the sea water is salty because of the gradual concentration of dissolved chemicals eroded from the Earth's crust is dumped into the sea. Furthermore, solid and gaseous ejections from volcanoes under the sea, suspended particles that are swept to the ocean from the land by onshore winds, and materials dissolved from sediments deposited on the ocean floor also contribute to its saltiness.
Salinity is increased by evaporation or by freezing of sea ice and it is decreased as a result of rainfall, runoff, or the melting of ice.