Illusion
Takes the appearance of the last conscious party Pokémon upon being sent out until hit by a damaging move.
Full effect
This Pokémon, upon being sent out, appears to have the species, nickname, and Poké Ball of the last Pokémon in the party that is able to battle. This illusion breaks upon being hit by a damaging move. Other damage, e.g. from weather or Spikes, does not break the illusion, nor does damage done to a Substitute. If the party order becomes temporarily shuffled around as Pokémon are switched out in battle, this ability chooses the last Pokémon according to that shuffled order.
In game description
The Pokémon fools opponents by entering battle disguised as the last Pokémon in its Trainer's party.
Pokemon with Illusion
Using Illusion in Cobblemon
Abilities are passive and always active, so Illusion costs you nothing to run. If it is marked hidden on a species above, expect it to be harder to obtain: servers differ in whether hidden abilities come from breeding, an Ability Patch, or events.
See the Pokedex for which abilities each species can have, and IVs, EVs and breeding for how to actually pass one down.