From Bulbapedia, the community-driven Pokémon encyclopedia.
| Ghost World|
れいかい Spirit World
The portal to the Ghost World in Litwick Mansion
|| Ghoul Daze!
The Ghost World or spirit world (Japanese: れいかい Spirit World), also referred to as the world of spirits, is a plane of existence depicted in the anime and mentioned in the games. It is known to be home to Ghost-type Pokémon—most notably Dusknoir—as well as actual ghosts of people and Pokémon. It is also known to emit electrical or radio waves.
In the games
All of Dusknoir's Pokédex entries highlight its connection to the Ghost World. Its Diamond and Pearl Pokédex entry mentions that the antenna on its head captures radio waves from the "world of spirits" that command it to take people there. Its Platinum, Black and White Pokédex entry mentions that it takes lost spirits into its body and "guides them home", presumably referring to the Ghost World. Its HeartGold and SoulSilver Pokédex entry mentions that it travels to "worlds unknown" and that it takes lost spirits with it, which is also presumed to be a reference to the Ghost World.
In addition to these, the Japanese name of the Reaper Cloth (れいかいのぬの Spirit World Cloth) indicates that it comes from the Ghost World.
In the anime
The portal to the spirit world at the Summit Ruins
The spirit world debuted in Ghoul Daze!. The staff of the Pokémon Summer Academy were renovating the Summit Ruins so that the students could collect medals from there as part of a competition they had set up, but accidentally damaged a stone structure, which created a cave that was actually a portal to the spirit world. Doing so allowed a ghost girl to escape, who was followed by a Dusknoir who was trying to protect people from the ghost girl and send the ghost back to the spirit world. The girl first tried to lure Conway off a cliff, then tried to lure Ash and Angie into the portal to the spirit world. When this failed, she was able to cause the spirit world portal to forcefully suck Ash and Angie into it. However, she was stopped by Dusknoir, who then destroyed the cave, sealing the entrance to the spirit world and trapping the ghost girl there. Also in this episode, Dusknoir's Pokédex entry mentions that it receives electrical waves from the spirit world with its antenna and it is said to take people to the spirit world as well.
The Ghost World, as it is now referred, then appeared in Scare at the Litwick Mansion!. In this episode, several wild Litwick and a Lampent opened a portal to the spirit world in the Litwick Mansion. As described in their Pokédex entries, Litwick and Lampent will pretend to be helping people by illuminating dark areas, but are actually leading them to the Ghost World while sucking their life energy.
The portal appeared when the Litwick and Lampent's attacks hit the wall, blowing part of it away. Later, all the walls, as well as the ceiling, disappeared, so it can be thought that Ash and co., along with Team Rocket, were actually in the Ghost World. The walls and ceiling reappeared once the Pokémon were defeated.