Sometimes, the DM might offer you a devil’s bargain. A devil’s bargain offers you a better chance to succeed at a particularly critical roll, but it comes at a cost. The DM will suggest a negative consequence before a roll. If you accept the consequence, you get to roll with advantage.
Example
It’s your turn in combat, and you’re about to fire an arrow at a monster. The monster is at critically low health, but it’s about to attack your downed ally. The DM offers the following devil’s bargain: you get advantage on your attack, but it’s your last arrow.