It is explained in Kingdom Hearts 358/2 Days.
*SPOILER*
Riku captures Roxas after being defeated. However, he has to tap into the dark power in order to do so. That's why he looks like "Ansem" Riku/Ansem takes Roxas back to Diz and Roxas is place in a simulation Twilight Town while Namine works on Sora's memories, which she messed up in Kingdom Heart: Chain of Memories.
When you first start the game you are in Twilight Town. and your controlling a boy who lives there named Roxas.
Riku and DiZ captures Roxas and puts him in the virtual Twilight Town.
In Kingdom Hearts 2, Roxas beats Axel in the DiZ's simulated Twilight Town, since Roxas then destroys the computer before returning to Sora. After that, Sora ends up in the real Twilight Town then uses the real, un-broken computer to teleport to the fake one with the broken computer.
If you are still Roxas, continue playing until you can be Sora. Once you can play as Sora, go to the train station and get on the train.
For most of the game he hides his cowardly butt in the alternate Twilight Town aka Roxas' Twilight Town with Riku. He emerges later to go to The World That Never Was where Organization XIII's HQ is.
Xion faded from existence, Roxas' memory was erased and he was placed in Twilight Town, and sadly everyone forgot about Xion.
Traverse Town is in KH1 but not in KH2. Whereas, Twilight Town is in KH2, not KH1.
you find it in Twilight town in the room where the tubes are. if you remember game play as Roxas and where you saw Donald and Goofy and when you are Sora there is a chest there
Two conceivable ways are that DiZ, after being unsuccessfully attacked by Roxas, forced Roxas out of the virtual town and reunited him with the real Sora, or that the virtual Twilight Town has enough of a spiritual connection with the real Twilight Town (implied as the real Pence seems to recall Sora in some way, which should've been impossible) to allow Roxas to reunite with Sora through dataspace. The latter seems to be the one people just follow to save themselves the thinking, though I agree that it's an anomaly missed by the creators; we can only speculate to decide what actually happened.
twilight town, world that never was
In the Haunted Mansion in Twilight Town
Roxas beated Axel in DiZ's simulated Twilght Town. You can tell because everyone was frozen.