Rolling a d20 and getting a “nat 20” or natural 20 is an a critical hit. A critical hit doubles the damage of the damage dice roll before the modifier.
Bob the paladin rolls a d20 and gets a natural 20 (critical hit!).
Bob then rolls a d8 for his weapon damage. He gets a 5. The 5 is doubled to 10. Bob then applies his +3 strength modifier to the total, for 13 damage all together.
Sidenote: Some DMs consider a natural 20 a hit even if that still doesn’t equal the creature’s armor class even with the attack modifier applied. For example, if a creature has an armor class of 30, some DMs would consider a nat 20 still a hit even if 20 + an attack modifier of 5 doesn’t equal or exceed the creature’s AC.
Attacking With Spell:
Some spells automatically hit. For example, Magic Missle automatically hits the target, and the caster rolls the damage dice listed.
Other spells either have an Attack Roll:
CASTER’S Ability Modifier + CASTER’S Proficiency + CASTER’S 1d20 roll
Or other spells might have a Chance to Save:
TARGET Ability Modifier + TARGET’s 1d20
The target’s total must be equal to or higher than the caster’s Spell DC (Ability Modifier + Proficiency + 8)
Spell Ability is the modifier from whichever stat your class is focused on (Int, Wis, or Cha). Example: A wizard’s spell ability is Int, so the spell ability modifier is the + bonus from his int (+2, for example).
Attacking With a Ranged or Melee Weapon
To find out if an attack hit:
Proficiency + Ability Modifier + d20 roll
Proficiency – depends on level, can be found at the top left of your character sheet or in the player’s handbook under your class’s page
Ability Modifier – If your weapon is melee, your modifier is likely strength. If your weapon is ranged, your modifier is likely dexterity. Finesse weapons such as daggers or monk weapons use dexterity. Hefty ranged weapons such as javelins and throwing axes use strength.
Damage With a Ranged or Melee Weapon
To determine damage:
Ability Modifier + d20 roll
Ability Modifier – use the same modifier (either dexterity or strength) that you used for attack hit.