Change your preferences here.
The user copies the move that the target last used, with max PP. This move replaces Mimic in the user's movepool and persists until the user either faints or switches out. Mimic fails if the user has transformed or if the target has not made a move. Mimic cannot copy Chatter, Mimic, Sketch, Struggle, or Transform. This move cannot be blocked by Substitute.
It is worth noting that in Japanese versions of Diamond and Pearl, a glitch occurs which allows any Pokemon with Mimic to learn any move or combination of moves that it wants to. First, the Pokemon with Mimic copies the move Transform, and then uses Transform on the Pokemon with the moveset it wishes to copy (typically Smeargle). If the Mimic user then faints, but the player wins the battle, the Mimic user then will know all the moves it copied permanently. In addition, if you then transfer said Pokemon to Black or White, after having copied Sketch, you can then learn one BW exclusive move. For example, you can have an Ursaring with ExtremeSpeed and V-create, or a Machamp with Sheer Cold. This is exploited to its fullest extent in the Street Pokemon metagame, where all of these combinations are legal, as they are technically possible on the cartridges without an external hacking device.
Mimic has little competitive use. First of all, the copied move resets when the user switches out, meaning even if the user copies a good move, it will not have it for the entire battle. Second, Mimic is often a wasted moveslot since the Pokemon will prefer a more reliable coverage move.
Copycat is a similar move that copies the last successfully executed move used in the battle.
Me First is a similar move that copies the move that the target selects and uses the target's move at 1.5x power.
Mirror Move is a similar move that immediately uses the last move that the opponent used to target the user.