Rolling against the target number
For actions that can fail, a d20 is rolled and applicable modifiers are added before comparing the total with the target number. Meeting or beating the target number counts as success. Falling below it counts as failure, and certain rolls also fail when the unmodified die shows a 1.
Step-by-Step Guide
Roll and add modifiers
Roll a d20 for the uncertain action and add the modifiers that apply to it.
Compare with the target
Set the total against the relevant target number: Armour Class for an attack roll, Difficulty Class for an ability check, or the save DC for a saving throw.
Read the outcome
If the total is at least the target number, the attempt succeeds; if it is lower, it fails, and some rolls additionally fail on an unmodified 1.

