Immunity is an avoidance mechanic available to both players and NPCs. It can be triggered by both items and spells, and it is also sometimes native.
When immune to a spell or ability, a player will not be affected by neither its damage nor any secondary effect triggered by it. Temporary immunity also clears out all debuffs of the affected schools.
Abilities such as and grant temporary total immunity in nearly all cases, and purges them of most debuffs including snares, roots and stuns, although exceptionally potent abilities such as can still remove the effect.
Since patch 1.6, Immunity can also affect mechanics by themselves, such as root, snare, etc. A mob immune to snares will show up "Immune" when hit by a , but not when hit by a ; the mob will not be snared by the Frostbolt but will still take damage normally.
If a player becomes immune to all abilities, a mob can perform it will switch to the next highest target on aggro (unless there are no other targets on its aggro table).