You use the oxidation numbers of "O" and "H" to figure out the oxidation numbers of "C".
stackrelcolor(blue)(0)("C")_2 stackrelcolor(blue)("+1")("H")_4 stackrelcolor(blue)("-2")("O")_2 + stackrelcolor(blue)(0)("H")_2 → stackrelcolor(blue)("-2")("C")_2 stackrelcolor(blue)("+1")("H")_6 stackrelcolor(blue)("-2")("O")+ stackrelcolor(blue)("+1")("H")_2stackrelcolor(blue)("-2")("O")
stackrelcolor(blue)(0)(color(white)("C"))color(white)(l)stackrelcolor(blue)("+4")(color(white)("H"))color(white)(ll)stackrelcolor(blue)("-4")(color(white)("O"))color(white)(mmmmm)stackrelcolor(blue)("-4")(color(white)("C"))color(white)(l)stackrelcolor(blue)("+6")(color(white)("H"))color(white)(ll)stackrelcolor(blue)("-2")(color(white)("O"))color(white)(ml)stackrelcolor(blue)("+2")(color(white)("H"))color(white)(ll)stackrelcolor(blue)("-2")(color(white)("O"))
You write the oxidation numbers of "O" and "H" above the atoms and their total oxidation number beneath them.
Thus, for "C"_2"H"_4"O"_2, the sum of their oxidation numbers is +4-4 = 0.
Hence, the sum of the oxidation numbers of the two "C" atoms is zero, so their average oxidation number is zero.
Similarly, in "C"_2"H"_6"O", the sum of the oxidation numbers of "O" and "H" is +6-2 = +4, so the two "C" atoms must add up to -4, or -2 for each "C" atom.
We see that the oxidation number of "C" decreases from 0 to -2, so the "C" atoms are reduced.
Similarly, the oxidation number of "H" increases from 0 in "H"_2 to +1 in water, so the hydrogen is oxidized.