Some creatures can grapple, others have a grapple built into their attacks. Taking the example of a roc's Talons attack:
Talons. Melee Weapon Attack: +13 to hit, reach 5 ft., one target. Hit: 24 (4d6 + 9) slashing damage, and the target is grappled (escape DC 19). Until this grapple ends, the target is restrained, and the roc can't use its talons on another target.
To escape such a grapple, a creature would need to use its action and beat the DC (which is a contested grapple, or in the roc's case, a flat DC of 19, which is presumably its "passive Athletics"). This is described in the PHB (p. 195) under "Grappling":
Escaping a Grapple. A grappled creature can use its action to escape. To do so, it must succeed on a Strength (Athletics) or Dexterity (Acrobatics) check contested by your [or the roc's, in this case] Strength (Athletics) check.
However, what if the roc became stunned (for example, by a monk's Stunning Strike)? The Stunned condition (PHB, p. 292) says, among other things:
- The creature automatically fails Strength and Dexterity checks.
So, if I found myself grappled by a roc (or some other creature), my monk friend managed to stun it, then it was my turn, would I still need to use an action to escape the grapple (with an automatic success), or can I just walk out of the grapple at that point since it can't resist my efforts to escape (leaving my action free to do other things, such as attack)?