You cannot "exit" a route on the Pokéwalker. It's a separate pedometer device; routes are not connected to the main game.
The Pokéwalker lets you train Pokémon while walking: they level up, learn moves, find items, and encounter wild Pokémon. To stop, simply turn it off and reconnect to your game to transfer Pokémon back.