Magic Barrier boosts magic defense temporarily. This includes defense against all offensive sorceries, offensive miracles (except Lightning Spear and its variants), and any weapon that deals magical damage. Magic Barrier counts as a personal buff, so it is impossible to use other buffs (such as Power Within, Flash Sweat, etc.) while it is in effect.
Great Magic Barrier is an upgrade over Magic Barrier, boasting higher magic resistance in exchange for fewer casts.