What is the oxidation state of oxygen in Na2O2?
Oxygen can take multiple oxidation states. This particular compound is sodium peroxide.

You're right that usually oxygen has a charge of -2, but in this case, there's no way that each $\ce{Na}$ can have an oxidation state of +2.

So you then work backwards, deciding if it's $\ce{Na+}$ then you have +2 from the sodium, and oxygen must have an average oxidation number of -1 per oxygen atom.

Besides peroxides ($\ce{O2^{2-}}$) there are also superoxides ($\ce{O2^{-}}$).

It's not surprising that these compounds are usually very reactive.