In calcium hydroxide, calcium (Ca) loses two electrons to become Ca2+ cation, while hydroxide (OH-) gains an electron to become O2- anion. These ions are then attracted to each other to form an ionic bond.
Covalent bonding occurs when atoms share electrons to form a molecule, while ionic bonding occurs when electrons are transferred from one atom to another to form positively and negatively charged ions.