In calcium oxide, the bond formed is ionic or electrovalent bond. It is electrostatic force of attraction between positively charged Ca2+ ions and negatively charged O2− ions. Calcium is highly electropositive alkaline earth metal and oxygen is highly electronegative non metal. Due to large electronegativity difference between metal and non metal, the bond formed is ionic.
Calcium atom loses two electrons to form positively charged Ca2+ ion. O atom gains two electrons to form negatively charged O2− ion.
Ca→Ca2++2e−
O+2e−→O2−