Illusion is an ability introduced in Generation V. So far, 2 Pokémon have this ability.
When a Pokémon with the Illusion ability switches into battle, it takes the form of the Pokémon in the last slot of the player's party. Illusion will not activate if the Pokémon in last place is the same species or is fainted.
The effect is aesthetic only; Illusion does not change the Pokémon's type or moves. Any direct attack (i.e. not entry hazards, weather conditions, etc.) will break the illusion.
Outside of battle
Illusion has no effect outside of battle.