Opportunity attacks on a grid: what provokes and what does not
One trigger, one reaction, one attack. You can make an opportunity attack when a hostile creature you can see moves out of your reach, and you use your reaction to make one melee attack against it as it leaves. That is the whole rule. Almost every argument at the table comes from importing something from another edition: attacks of opportunity for casting a spell, for standing up, for moving within reach. None of those provoke in 5e.
· 5 min read · TerrainTale

The rule, and the three words that matter
The three words are see, out and reach. You must be able to see the creature, so a blinded character makes no opportunity attacks and a creature leaving while invisible provokes nothing. It must move out of your reach, not within it, so a creature circling you at 5 feet is safe all day. And reach means your reach, which is 5 feet for most weapons and 10 feet for a glaive, halberd, pike, whip or lance.
The attack happens when the creature leaves, using the reaction you have not yet spent this round. One reaction per round means one opportunity attack per round, no matter how many enemies run past you, which is the single most useful fact for a player deciding whether to disengage. It is also a single attack rather than an Attack action, so an Extra Attack does nothing for it, and a rogue gets no Sneak Attack from it unless the usual conditions happen to be true.
- Provokes: stepping from a square inside your reach to a square outside it.
- Does not provoke: moving within your reach, standing up, drinking a potion, casting a spell.
- Does not provoke: being moved by someone else, teleporting, or being shoved away.
Disengage, teleport and being shoved
The Disengage action means your movement does not provoke for the rest of the turn. It costs an action, which is the real price, so it is usually the right call only for a character who was not going to attack anyway or who would eat two or three opportunity attacks getting out.
Teleportation never provokes, because you do not move out of reach, you cease to be there. Misty Step is the classic answer to a grappler with a polearm. Being moved by someone else does not provoke either: a shove, a thorn whip, a telekinetic push and a gust of wind all relocate you without you spending movement, so nothing triggers. This is worth remembering when an ally wants to drag a downed friend out of the front line.
Reading threatened squares on the map
A Medium creature with a 5-foot reach threatens the eight squares around it, including the diagonals. A creature with a 10-foot reach threatens the twenty-four squares within two, which is a large part of a small room. A Large creature occupies 2 by 2 squares and threatens everything adjacent to that block, which is twelve squares at 5-foot reach.
The practical habit is to look at the square you want to end in and ask whether it is still adjacent to the thing you are leaving. If it is, nothing happens. If it is not, the enemy gets a swing, unless it has already used its reaction. On a VTT where minis snap to the grid and the ruler counts the squares as you drag, that check takes a second and settles most of the disagreements before they start.

The cases tables argue about
Four come up again and again. A creature that is knocked prone and then crawls away does provoke, because crawling is movement. A creature that is grappled cannot move at all, so the question does not arise until the grapple ends. A creature moving from your reach into another ally's reach provokes from you only, not from the ally it approaches. And a creature with a 10-foot reach can be left by a creature moving from 10 feet to 15 feet, which provokes even though it was never adjacent.
The last one surprises people. A reach weapon threatens a ring two squares deep, and a ring has an outer edge as well as an inner one. Stepping across that outer edge is leaving your reach as surely as stepping off a toe, which means a halberd user gets swings at creatures that were never adjacent to them. It also means the halberd user cannot threaten anything that stays put at 15 feet, so the ring cuts both ways.
Using it as a DM without punishing movement
Opportunity attacks exist to make the front line mean something, not to freeze the map. If your monsters never move, players learn that positioning is irrelevant and stop thinking about it. Let a monster take the hit to reach the wizard; one d8 is cheap for the right target, and it teaches the party that the front line is a decision and not a wall.
The opposite failure is also common. A room where every enemy has reach and the party has no way out is a fight nobody can move in. Give the map a way around: a pillar to break contact behind, a second door, a raised ledge. Terrain that rewards movement is what makes the reaction worth having.
- Have one monster per fight spend the hit to get past the front line.
- Put a reach weapon on one enemy, not on all of them.
- Leave at least one route out of every room that does not cross a threatened square.

Tracking reactions so nobody double dips
The commonest mistake at a busy table is a monster making two opportunity attacks in a round. Keep a marker on anything that has spent its reaction, and clear the markers at the top of each creature's turn, because a reaction refreshes at the start of the creature's own turn rather than at the top of the round.
An initiative tracker that shows the order plainly makes this easy, because you can see at a glance whose turn has come round again and therefore whose reaction is back. TerrainTale tracks HP, conditions and initiative on the tokens in play mode, which is enough to keep reactions honest without a separate sheet. A condition marker reading spent, cleared when the creature's turn starts, costs nothing and removes the most common source of a monster getting a free attack it should not have had.