"Magic" itself isn't an explanation, it's an excuse for not seeking an explanation. It can also be a category of explanation (that is you could develop an explanation which involves magic), but any explanation in that category is unlikely to actually be particularly simple in the sense of Occam's razor, in that it will involve invoking new entities that are not already needed to explain other phenomena. Occam's razor is simply a test of parsimonious when considering expansion of an effect in the context of all other effects.