Magic resistance

Magic resistance was an ability that could prevent magic from taking effect on a creature or person.

Various creatures steeped in magic, like the drow and most dragons and fiends, possessed magic resistance, though the likelyhood to negate any one spell or effect varied widely between different species.

Certain magical items, like a potion of magic resistance, also granted this ability.

Background
Magic resistance was a concept used in the 1st and 2nd edition of Dungeons & Dragons. In the 3rd edition it was replaced by the two abilities of spell resistance and spell immunity.