When a player leaves a multiplayer game, all permanents and spells they own are removed from the game immediately (CR 800.4a). This means any permanent that player controlled is exiled, making it no longer a valid target for any spell or ability still on the stack.
At the time the spell would resolve, the game checks whether all targets are still legal (CR 608.2b). If every single target of a spell is illegal at that point — because the targeted permanent no longer exists — the spell is countered by the rules, not by any player. It does not resolve, and its effect does not happen.
This is commonly called "fizzling": the spell is countered due to all targets being illegal, and it goes to the graveyard with no effect (CR 608.2b). Note that if a spell has multiple targets and only some become illegal, the spell still resolves but simply ignores the illegal targets.
Example: You cast Pacifism targeting your opponent's creature. Before it resolves, that opponent concedes and leaves the game. Their creature is removed from the game (CR 800.4a). When Pacifism tries to resolve, its only target is gone, so it is countered by the rules and goes to your graveyard with no effect.
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.