This largely depends on what game platform you are using to develop your game.
For example, in Game Maker 7 you would create two rooms and use the Next Room command to change between rooms when a certain list of criteria are satisfied.
In Flash, you would most likely use a large movieclip for each map and use the document class to change between each movieclip. You could also use two frames in the timeline and switch between them that way.
You will need to give us more information on what platform you are using to develop your game before you can get any detailed information.