From Bulbapedia, the community-driven Pokémon encyclopedia.
An outsider Pokémon is a class of Pokémon in the Pokémon games that is not originally from the same game cartridge as the player.
A Pokémon is recognized as an outsider if its original Trainer identification does not match up with the current saved game. This means that if a Pokémon is traded out of a game that is later restarted, and the Pokémon is traded back in, it will be treated as an outsider.
While appearing no different to any Pokémon caught by the player (apart from the OT name and Trainer ID), an outsider Pokémon may behave in a different manner to those found in-game. If the Pokémon Trainer in possession of the outsider Pokémon has less than the sufficient amount of Gym Badges, the outsider may choose to disobey commands in battle. This can range from using a different move from the one instructed, "loafing around", or even taking a nap.
The in-game reasoning provided for this is that Pokémon respect Trainers who have defeated Gym Leaders: thus, by earning more Badges, a player will gradually cause an increased number of Pokémon to listen to him or her. Also, this rule arguably stands to prevent someone from trading in a high-leveled Pokémon trained on to another game, and easily beating his or her game.
While there is a chance that the Pokémon will not listen to its new Trainer, it will grow faster once traded. Outsider Pokémon gain 1.5 times the normal experience points awarded for participating in battles; outsider Pokémon from other countries will gain 1.7× the normal experience. This is denoted in-game with "Pokémon gained a boosted X Exp. Points!" Non-outsider Pokémon can gain this boost by holding the Lucky Egg.
Even if two different saved games have the same Trainer name, and (although rare) a matching ID number, Pokémon from the games may be outsiders to each other because of a third value: a hidden, secret ID. In the event that all three values match, the Pokémon may be traded without being classed as outsiders. This has a 1 in 4,294,967,296 (2-32) chance of occurring.
Methods of obtaining outsider Pokémon
Outsider Pokémon can be obtained in a number of ways. If the player has multiple game paks and game systems, a Pokémon may be exchanged in a trade. He or she may also trade with a friend's game and (Generation IV onwards) via Global Trade Station. Trading is possible in-game, as well, and each main series game has a number of non-player characters who will trade one of their Pokémon (which may or may not be otherwise obtainable) for one of the player's.
Sometimes, non-player characters will give out Pokémon with no exchange: usually, though, these Pokémon will have the same ID and OT name as the player. In some instances, however, such as Webster's Spearow in Gold, Silver, and Crystal and their remakes, HeartGold and SoulSilver, the Pokémon given to the player will be recognized as an outsider, and thus have the experience boost and potential disobedience.