The legend rule is a state-based action checked continuously by the game. Under CR 704.5j, whenever a player controls two or more legendary permanents with the same name, that player chooses one to keep and puts all the others into the graveyard. This happens immediately, without using the stack, so no player can respond before the extra copies are removed.
It is important to note that the controller of both copies is what matters, not ownership. If two different players each control a copy of the same legendary permanent, neither copy is put into the graveyard — the legend rule only triggers when the same player controls multiple copies (CR 704.5j).
The player who controls the duplicates chooses which copy to keep. This means you can strategically keep whichever copy is more advantageous — for example, one that has already attacked, has counters on it, or has a beneficial aura attached.
Concrete example: You control Giada, Font of Hope. Your opponent plays a spell that puts a token copy of Giada onto your side of the battlefield. State-based actions are checked, you now control two legendary permanents named Giada, so you choose one to keep and the other is immediately put into your graveyard — no spells or abilities can be cast in response.
Note that some cards like Mirror Gallery or the ability granted by Sakashima of a Thousand Faces can turn off the legend rule for permanents you control, allowing duplicates to coexist (CR 704.5j references that the rule only applies if no effect says otherwise).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.