system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why is there so much salt in the ocean? Where does it come from?
gpt
The sodium and chlorine, which you think of as components of salt, actually entered the ocean separately. The sodium is from dissolved rock, both from the sea floor and from runoff from the continents; sodium is very soluble and many of the most common rocks on the surface of the Earth (like basalt and granite) contain it. The chlorine, on the other hand, is mostly outgassed from volcanic vents. Other ions, particularly calcium, dissolve easily but are also removed from seawater more quickly (e.g. calcium being filtered out by living things to make shells and bones, which ultimately become rock and recycle back into the mantle).

The reason there's so much of it is that it leaves the ocean only very slowly. It can be left on land when the sea recedes after times of high sea level, it can be buried along with the seafloor by subduction under continental plates, or it can slowly react with other rocks on the seafloor. All of these processes are very slow and the rates at which they happen are proportional to how much salt is already in the ocean: if the ocean gets saltier, they speed up; if it gets fresher, they slow down. This acts as a negative feedback that keeps the level of salt in the ocean relatively stable even over geologic time.