Attack of opportunity: take the attack, or take a -4 to AC vs. opponents adjacent to your current position for 1 round (vs. opponents who would have been granted the AOO). This allows a Withdraw action in the next round, which forfeits your next turn at the cost of no AOO (hopefully).
Grapple: only allowed to attack back with light (not 1h) or natural weapon, and not a full attack. Unarmed attacks do not provoke AOO’s from anyone who is part of the grapple.
5th Edition: Disarm/Trip: retrieving weapon or standing up gives some kind of debuff (“on your heels”), since the AOO for this action has been removed.