Whenever a nontoken creature enters, its controller creates a token that's a copy of that creature.
Whenever a nontoken creature leaves the battlefield, exile all tokens with the same name as that creature.
When this enchantment leaves the battlefield, exile all tokens created with this enchantment.
If a legendary creature enters the battlefield, the token is put onto the battlefield and then the "legend rule" forces its controller to put either the original or the token into its owner's graveyard before any player can take any actions.