Combustion of calcium metal:
2 Ca(s) + O2(g) -> 2 CaO(s)
with oxidation states:
(0) (0) -> (Ca 2+), (O 2-)
Hence, oxidation:
2 Ca(s) -> 2 Ca(2+) + 4 electrons
Because we write in simplest mole ratios:
Ca(s) -> Ca(2+) + 2 electrons
Reduction
O2(g) + 4 electrons -> 2 O(2-)
Note that in the case of oxygen, because O2 is a diatomic gas element molecule we can't dismantle that apart in our reduction half-equation.
The oxidation state of the oxide ion is also specifically 2-. This can be easily inferred from the periodic table. (If we had fluorine being reduced into the fluoride ion then the oxidation state of the fluoride ion is 1-.)