Imagine a mid-ocean ridge. Between two diverging plates, a volume of molten basalt is constantly being oozed out of the mantle. The molten basalt itself is really hot, over 1000°C. In contact with cool seawater it quenches instantaneously into volcanic glass. However, in areas (open cracks, for example) where permeable freshly erupted basalt is available, seawater reacts with it at 200-500°C. After the reaction basalts acquire new look, or we say, it becomes altered, - it has new minerals in it. From igneous and water-free rock, basalt converts to water-bearing hydrothermal mineral assemblages. These areas of hydrothermal activity are partly responsible for modern seawater chemical (and isotopic) composition and its acidity. Reacting basalt supplies Mg, Si, Ca and other elements into the seawater. In turn, the reaction with basalt sucks out other elements out of seawater, such as Na and S. I will show that at some point, reacted seawater can become pretty acidic with pH of 3.8. These underwater hot springs frequently form black smokers where unusual forms of life can exist because of the supply of heat.

The graph shows concentrations of products of reaction between seawater and basalt at 300°C. The right side of the graph can be interpreted as pure seawater (very little rock added), thus the water-to-rock ratio is really high. Without any involvement of basalt, seawater is oversaturated with anhydrite and brucite. Depending on the proportion of rock in the mixture, different minerals will precipitate. Moving to the left along the horizontal axis, more rock is reacting with seawater. At very high water-rock ratios, basalt turns into a mixture mostly consisting of anhydrite, serpentine, hematite, talc and chlorite. At low water-rock ratios (basalt-dominated system), the products of reacting are albite, amphibole (mostly tremolite), zeolites, pyrite, quartz and epidote. These minerals compose a large portion of seafloor, mostly it's deeper layers because at some point they underwent high temperature hydrothermal alteration at mid-ocean ridges.
In turn, the left over seawater has modified concentrations of ion dissolved in it.