Answer is: ionic bond.
Ionic bond is the electrostatic attraction between oppositely charged ions, cations (positive ions) and anions (negative ions).
For example compound magnesium chloride (MgCl₂) has ionic bond. Magnesium transfers two electrons, form positive cation Mg²⁺, to chlorine, form anion Cl⁻.
Another example, potassium bromide (KBr) is ionic solid, it has ionic bonds.