The Earth’s hydrosphere is the oceans. They consist mainly of water, with some dissolved compounds. The ionic compounds that are dissolved in sea water are mainly salts, and make the water taste salty.
When metals react with non-metals, electrons are transferred from the metal atoms to the non-metal atoms, forming ions. The resulting compound is called an ionic compound.
Here are some examples:
sodium + chlorine → sodium chloride
magnesium + oxygen → magnesium oxide
calcium + chlorine → calcium chloride
In each of these reactions, the metal atoms give electrons to the non-metal atoms, so that the metal atoms become positive ions and the non-metal atoms become negative ions.
There is a strong electrostatic force of attraction between these oppositely charged ions, called an ionic bond.
The animation shows ionic bonds being formed in sodium chloride, magnesium oxide and calcium chloride: