You play the same story with different DMs? How this works?
Generally, pretty well. Game quality varies, but everyone gets a chance to play and you don't run into DM burnout.
Or were you asking about the mechanics of it? I've covered it before, but I'll give you the Reader's Digest version.
We start a campaign with a map and some general guidelines. We've used Middle Earth, the real world, maps from Steve Jackson's site, Forgotten Realms, it doesn't matter. We invent/agree upon some major issue or problem as the driving story arc.
Each player makes up their character, and the city/state/nation they come from. They're brought together to deal with that major issue or problem, and that's the group's long term goal.
Someone starts things rolling by being the first DM. They get to lay a lot of the ground rules. Their adventure takes place in the land their character calls home, and their PC sits it out or operates as a background NPC.
When their tale is done, someone else takes over, and the party finds that their mission now leads them to the land that the new DM's character calls home. The old DM's character becomes active and the new DM's character goes inactive. After that's done we find ourselves pursuing leads in yet another part of the game world, and someone else becomes DM, and so it goes.
When you're DM, your character is off doing something or other that earns them EXP and treasure to match what they would have gotten with the group, so DMing isn't a character penalty.
Some rules issues get worked out in committee, since they involve everyone who has to play and/or DM with the decision.
Now, do we ever find all the parts to the broken artifact, track down all the forgotten lore or lift the curse that hangs over the world? Yeah, eventually. That, however, happens at the end of the campaign. Mission accomplished, world saved, heroes retire, etc.