You need to remember that usually, the oxidation number of oxygen in any compound, excepting `BaO_2` , is -`2` , hence, in the given redox reaction the oxygen is reduced from 0 to -2 state.
You need to place the oxidation number above each element in redox reaction, such that:
-4 +1 0 +4 -2 1 -2
`C H_4 + O_2 -> C O_2 + H_2 O`
Since the oxidation number of O decreases from 0 to -2, then the oxygen is reduced in the given redox reaction.