That is called an lonic bond.
Ionic bonds are formed
between elements with greater than 1.4 electronegative variance and to a
lesser extent by first ionization energy variance, such as alkali
metals and nonmetal halogens for example. The element of lesser
electronegativity, the cation, donates an electron(s) from it's valance
shell to the element with the greater electronegativity, the anion,
which accepts the electron(s) unto it's valance shell. This bond is
extremely strong and has a high melting point but because of waters
polar nature this type of bond, usually, not always, disassociates in
water.