* Covalent bonds occur when atoms share electrons to achieve a stable electron configuration.
* Ionic bonds occur when one atom donates an electron to another, forming ions with opposite charges that attract.
In the case of oxygen:
* Oxygen atoms have 6 valence electrons, needing 2 more to complete their octet.
* Two oxygen atoms share two pairs of electrons (a double bond) to achieve stability.
This sharing of electrons is the hallmark of a covalent bond.