What is the oxidation number of the #Mn# in #KMnO_4#?
As a rule, except for peroxides and superoxides, oxygen is always -2. so if we have 4 oxygens, that is a total of -8.
As a rule alkali metals (group 1 except H) are always in the +1 oxidation state. There is one group 1 metal, K. So that's +1
In order to balance out the total charge to give a net of zero, we have to balance
To solve this sort of question, you need to know the common oxidation states of group 1, group 2, group 17, and period 2 elements. Those don't change, except in rare circumstances. Everything else you can get by subtraction of the known oxidation states.
Permanganate ion is a potent oxidizing agent, and it is (typically) conceived to accept 5 electrons upon reduction:
This reaction is self-indicating in that permanganate is brightly coloured (deep-red), whereas
As to how you calculate the oxidation number, the sum of the oxidation numbers is equal to the charge of the ions, here