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:

So

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.