Magic Guard

Magic Guard protects the Pokémon from indirect damage, including:

It does not prevent damage from confusion, trapping moves (e.g. Bind) or Struggle.

In Generation 4 a Pokémon with Magic Guard cannot be poisoned from Toxic Spikes, nor become fully immobile through paralysis (though the Speed drop still occurs).

Game descriptions

Diamond
Pearl
Platinum
HeartGold
SoulSilver
The Pokémon only takes damage from attacks.
Black
White
Black 2
White 2
The Pokémon only takes damage from attacks.
X
Y
O.Ruby
A.Sapphire
The Pokémon only takes damage from attacks.
Sun
Moon
Ultra Sun
Ultra Moon
The Pokémon only takes damage from attacks.
Sword
Shield
B.Diamond
S.Pearl
The Pokémon only takes damage from attacks.

Other languages

EnglishMagic Guard
SpanishMuro Mágico
ItalianMagicscudo
Japaneseマジックガード (Magic Guard)
GermanMagieschild
FrenchGarde Magik