An Attack of Opportunity (AoO) is a single extra full BAB melee attack that a combatant can make when an opponent within 5ft takes an action that provokes an Attack of Opportunity.
A player gets a single melee AoO per round. This is done instantly - with a distinctive yellow colored particle effect (like a ghostly sword slash) but no animation. Your current target also doesn't change, and no actions are cancelled. If invisible or in stealth mode, you do not make AoO's - they are hostile actions and would usually break the stealth/invisibility at odd times (eg; for a caster with etherealness cast on themselves).
The attack is a single normal melee attack at your current primary right hand weapons attack (so, if using power attack your attack is lowered and damage increased). You also can make an AoO even if you are already at the maximum 6 base attacks.
If you cannot attack for any reason (eg: stunned) you cannot make attacks of opportunity. Casting a spell or doing another long action means AoO's are held until after it has taken place.
Causes of Attacks of opportunity
Attacks of opportunity occur against a person for these actions (if you are armed with a melee weapon and they are near enough for a melee attack**):
- Non-combat movement while in melee - moving into or out of a threatened area (Spring Attack denies all AoO from movement during combat. In theory, this could be used to prevent a melee opponent from landing an attack - with first Initiative, a character can land a blow, then move out of melee range before the opposing character makes an attack.)
- Making an unarmed attack without Improved Unarmed Strike against an armed opponent.
- Casting a spell without using defensive casting
- Attempting to Taunt
- Drinking a potion
- Using Disarm (Improved Disarm does not provoke the AoO)
- Firing a ranged weapon
Notable things which do not cause Attacks of opportunity
These notable things do not cause an AoO for whatever reason:
- Using a healing kit
- Using a spellcasting item (wand, scroll, rod, misc. item with a spell on it)
- Using knockdown (rarely triggers Attacks of Opportunity, very brief action)
**Note that casting a spell without using defensive casting will provoke an attack of opportunity regardless of whether or not you are armed with a melee weapon; merely being in melee range of an opponent is enough.