It has something to do with this leaky faucet. You see, rain falls on the land as fresh water. As this water flows downward, it ever so slightly erodes the rocks and soil. This causes an ever so slight amount of salt and minerals to dissolve in the water and continue downstream. Eventually, all the dissolved minerals get dumped into the ocean.
Meanwhile water on the ocean's surface evaporates into the air, ditching all those salts and minerals. It then falls back on land as fresh water, replenishes the lakes and rivers, and the cycle continues. In lakes and rivers, theres enough turnover that the water stays fresh. But in the oceans, the salts pretty much stay there for millions of years.
Worldwide, it's estimated that rivers dump about 4 billion tons of salts into the oceans each year. But even with all that new salt, the oceans are so big, that their salinity stays fairly constant, at about 3.5%.
Critical thinking challenge: How is the water cycle like a bicycle?