Garments are clothing that Mormons (better stated as members of the Church of Jesus Christ of Latter Day Saints, or LDS) wear to remind them of who they are. Just as a clergy would wear robes, Mormons believe garments are sacred and used to remind them of the commitments they have to their Father in Heaven. Instead of being an outward expression, as a clergy robe, it is an inward expression of their commitment. They don't believe it gives them magic powers, or wards off evil spirits. Garments, to Mormons, have a deep meaning of their personal commitment to God and their Commitment to follow Christ.
To understand more about "Magic Underwear", or Garments, and other Mormon beliefs go to www.mormon.org, chat with live people that can truthfully and clearly answer your questions, any question, and they will answer you.
Magic Underwear (Mormon Garments)