There are attack and damage types in warcraft 3.
If you are talking about magic as attack type, like the attacks of shamans you need magic as attack type and physical as damage type.
Standard abilities use the attack type spell, which is reduced by Runed Bracers and the damage type magic, that ignores armor and deals no damage against spell immune units.