Two atoms can share electrons like friends holding hands (a covalent bond) or one can snatch an electron and both cling by opposite charge (an ionic bond). Those grips are what turn loose atoms into salt, water, and everything else.
Atoms want full outer shells
Atoms bond to achieve a stable, full outer electron shell. In an ionic bond, one atom transfers electrons to another, creating oppositely charged ions that attract — typical between a metal and a nonmetal. In a covalent bond, atoms share electrons — typical between nonmetals.
Big difference in electronegativity → electrons transfer (ionic). Similar electronegativity → electrons are shared (covalent). Metals + nonmetals tend ionic; nonmetal + nonmetal tends covalent.
Sodium gives an electron to chlorine, forming Na⁺ and Cl⁻ that bond ionically as table salt (NaCl). Two hydrogen atoms share electrons covalently to form H₂.
- Consider a bond between magnesium (a metal) and oxygen (a nonmetal).
- Recall which pairing transfers electrons.
- Name the likely bond type.
What you should see: A metal with a nonmetal transfers electrons, so magnesium and oxygen form an ionic bond (MgO).