However, the orc's AC is only 20 so Garn hits the orc and causes damage. The damage done is determined by the type of weapon, in this case a long sword, and any modifiers such as from enchantments. An attack may also cause a critical hit which would inflict much greater damage. If he rolls a hit the second time, he's caused a critical hit. The damage done by the character is then rolled twice and added together.
Magic combat works somewhat differently.
Instead of comparing an attack value with your AC, spells effects are often determined by a check against a character's saving throw. Saving Throws reflect your ability to resist a spell or effect such as poison or paralyzation. These values improve with a character's level. A successful saving throw may mean that the character is not affected at all or that he only receives part of the effect. However, saving throws are not always used in magic combat.