Saltwater and freshwater can mix to some extent, but they tend to remain stratified or separate due to differences in their densities. The phenomenon you're referring to is known as "salinity stratification."
When salt is added to freshwater, it dissolves and forms a saline solution, creating saltwater. In this case, the salt molecules are evenly distributed within the water, resulting in a homogeneous mixture. However, when saltwater and freshwater are mixed together, the density of the resulting solution is influenced by the differences in salinity.
Saltwater is denser than freshwater due to the higher concentration of dissolved salts. The density of saltwater increases as the salinity rises. When these two bodies of water meet, the denser saltwater tends to sink below the lighter freshwater. This creates a stratification or layering effect, where the two waters form distinct layers that are reluctant to mix.
The stratification occurs because of the density difference. The lighter freshwater stays above, while the denser saltwater remains below. The interface between the two layers is known as the "halocline." The halocline can act as a barrier, preventing the thorough mixing of the two waters.
However, it's important to note that under certain conditions, such as strong turbulence or mixing forces, saltwater and freshwater can mix more effectively. Additionally, over time, natural processes like diffusion and currents can lead to some mixing, but it generally takes a longer period for them to mix completely due to the density disparity.