The GM calls for an ability check when a character or monster attempts an action (other than an attack) that has a chance of failure. When the outcome is uncertain, the dice determine the results.
For every ability check, the GM decides which of the six abilities is relevant to the task at hand. Some ability checks involve a skill. (77)
*Contest. Sometimes one character’s or monster’s efforts are directly opposed to another’s. This can occur when both of them are trying to do the same thing and only one can succeed, or when one of them is trying to prevent the other one from accomplishing a goal. The outcome is determined by a special form of ability check called a contest. (77)
A successful ability check is calculated as follows:
d20¹ + ability modifier² + proficiency bonus³ + other bonus or penalty ≥ DC of task*