The chemical reaction is the oxidation of calcium metal by molecular oxygen. During the reaction, calcium metal is oxidized, that is, loses electrons and oxygen is reduced, that is gains electrons.
During the reaction, the calcium atom donate two electrons in order to become stable and the oxygen atom accepts these two electrons. Therefore, during the reaction, EACH OXYGEN ATOM GAINS TWO ELECTRONS.