Hello,
KMnO4:
1)Split the compound up into its basic elements so K, Mn, O4
2)Oxygen's oxidation number is 2- but because there are 4 oxygen atoms then overall for O4 the charge is 8-
3)Potassium is in group 1 therefore it's oxidation number is 1+
4)As this compound has no overall charge the oxidation number overall should be 0.
5) So far you have 8- and 1+
6) Therefore Mn's oxidation number is 7+ so that all the charges cancel each other out.
Hope that makes sense!