Use oxidation states to identify the oxidizing agent and the reducing agent in the redox reaction.
2 Na(s) + 2 H2O(l) → 2 NaOH(aq) + H2(g)
2Na(s) + 2H2O(l) → 2NaOH(aq) + H2(g).
Na is oxidized to Na+ and H in H2O is reduced to H2.
The definitions of "oxidation" and "reduction" and you can assign oxidation numbers to the elements, and see how they change.
Any element, in the elemental state, like Na, has an oxidation number of zero.
In NaOH, Na has an oxidation number of +1. Therefore, it is oxidized.
In H2O, hydrogen has an oxidation number of +1. In H2 it is zero. Therefore, H is the element reduced
A Sodium ion (Na) has a oxidation number of +1. It gains an electron by reacting with OH, therefore it is the one being reduced.