Ionic bonding takes place in calcium oxide.
Electronic configuration of calcium is 2, 8, 8, 2 and that of oxygen is 2, 6.
So, calcium will lose two electrons and oxygen will accept two electrons to form a chemical compound calcium oxide (CaO) which stabilizes the atoms.