Roll the d20, add the number you rolled to either your stregth modifier (for a melee weapon, like a sword) or your dexterity modifier (for a ranged weapon, like a bow), and your BAB (Base Attack Bonus). If the sum matches or exceeds the AC (Armor Class) of the enemy, you hit them, and you can...