From Bulbapedia, the community-driven Pokémon encyclopedia.
The playing of credits signals the end of the main plot of a Pokémon video game. Credits list all the staff that worked on the game, including writers, artists, and translators.
Credits are played at the end of the main plot - in the main series, once the Elite Four and Champion have been defeated. In Gold, Silver, Crystal, HeartGold and SoulSilver the credits also appear everytime the player defeats Red. While the names scroll across the screen, the player is shown returning to their hometown, except in Black and White. In some games, flashbacks of the player's adventure are also played.
Unlike some other games, Pokémon games have more adventures after the credits have been played. In later games, these additional quests include challenging the Battle Frontier and obtaining the National Pokédex.
In side games, the credits usually roll after reaching a critical point in the storyline, such as the player saving Almia from the Incredible Machine (in Pokémon Ranger: Shadows of Almia), or defeating Rayquaza (in Pokémon Mystery Dungeon: Red Rescue Team and Blue Rescue Team).