To attack in DnD 5e, you choose a target, determine modifiers, and resolve the attack.
-
Choose a target in range. The target can be a creature, object, or location, unless the ability or spell specifies otherwise.
-
Make an attack roll. Roll a d20 and add relevant modifiers. For an attack with a weapon you’re proficient with, you add your attack ability modifier (Strength or Dexterity) and proficiency bonus to your attack roll.
For a spell attack, add your spellcasting ability modifier (Intelligence, Wisdom, or Charisma) and proficiency bonus to the attack roll.
-
Resolve the attack. If the result of the attack roll + modifiers is equal to or greater than the target’s AC, the attack hits. From there, you can Player’s Handbook, pg. 193