To escape a grapple, you must succeed on a Strength (Athletics) or Dexterity (Acrobatics) check contested by the grappler's Strength (Athletics) check.
Escaping other conditions that restrain you (such as manacles) may require a Dexterity or Strength check, as specified by the condition.