Difficulty Class (DC) is something that’s used a lot. Whether that’s Saving Throws or Ability Checks. Even Armor Class is a kind of DC. To put it simply, a DC determines how hard something is to do. Whether that’s climbing a rope, evading a breath weapon, or swinging an ax, different actions have different DCs.
To determine whether you beat a DC, you need to roll equal to or higher than said DC. But choosing how hard one is, is easier said than done. For example, walking across a treacherous rope bridge without falling might take a DC 15 Dexterity (Acrobatics) check, but resisting a Wolf knocking you prone takes a DC 11 Strength Saving Throw.
Many spells require Saving Throws and ability checks to negate but don’t even tell you what the DC is. That’s because the DC equals 8 + Your Spellcasting Modifier + Your Proficiency Bonus. And most other classes or features that require Saving Throws typically tell you how to calculate the DC or even tell you what the DC is outright!
But what if it’s something you make that requires a DC to be set, like an ability check? For that, you can use the following values as a guide (DMG p. 238):
A few things to know; however, a natural 20 doesn’t mean you automatically succeed. You still have to add your bonuses, but it usually results in the most favorable outcome, even though you can’t crit on ability checks. Likewise, a natural 1 doesn’t mean automatic failure or a critical failure. You could still pass the check if your bonuses are high enough. And on the note of failing a Check, the DM could still have it succeed, but just at a cost (e.g., you leap across the chasm, but you break your leg on the ledge as you didn’t land properly).
As you can see, it’s not that bad when you think about it. A DC is just a minimum result needed to perform a particular task and succeed with minimal loss. And so with that, I hope you roll high and low in the best of moments!