Wonder room switches the defense and special defense stats of all pokemon on the fiel for the 5 turns.
Magic room supresses the effect the opponents held item for 5 turns.
Example: If wonder room is used while Steelix is in battle, for 5 turns his special defense and his defense will have swapped, leaving him with high special defense and low defense until wonder room wears off.
If magic room is used while a pokemon holding leftovers is in battle, that pokemon won't recover HP from leftovers for 5 turns.
Hope I helped!