Na has an oxidation state of +1 whereas O has an oxidation state of -2. The compound is neutrally charged (has no charge) so the sum of all the elements' oxidation states must be zero.
There are 4 oxygen atoms so multiply it's oxidation state by 4:
[tex]4 \times - 2 = - 8[/tex]
So
[tex] + 1 + x - 8 = 0[/tex]
Where X is the oxidation state of chlorine.
1 - 8 = -7
So chlorine must have an oxidation state of +7 in order to cancel the -7 out to get zero.