Basically, Magic Guard stops all sorts of indirect damage dealt to the wielder. So that means the only way to damage the Pokemon is by using direct attacking moves, like Flamethrower, Earthquake, Surf, etc.
This means that all of the following effects can be used on the Pokemon successfully, but won't have any effect if they are:
- Damage from weather conditions, like Sandstorm and Hail.
- Damage from poisoned, badly poisoned and burned status conditions (note that the Attack reduction from burns if not removed; just the damage)
- Damage from the move Curse if a Ghost Pokemon used the move on the Pokemon
- Damage from Leech Seed - this means that the healing process is stopped as well
- Entry hazard damage (Spikes and Stealth Rock)
- Damage from recoil moves
- The 10% HP reduction experienced when using Life Orb (though the boost is still there)
And other things that cause damage, but not because of an attacking hitting the Pokemon. So basically, the only way to damage a Pokemon with this ability is by using moves that immediately cause damage on it. For example, Toxic will hit the Pokemon and poison it successfully, but it won't do anything because of the ability.
In terms of what it does for the Pokemon, it does a lot. It stops Reuniclus from being eaten by poison, allows Alakazam to switch in without worrying about losing its Focus Sash to entry hazard damage, and more. Immunity to Leech Seed damage is also useful to block Pokemon like Ferrothorn that use it as a way to both heal and damage.
Credit to Bubapedia for the list