Pokemon level up with experience.
The rate at which a Pokemon gains experience follows a rather complicated formula. Shinx happens to be in the Medium Slow Experience Group.
Factors that boost experience include:
- Winning a battle with a traded Pokemon
- Battling a trainer
- Holding a lucky egg (Gen II+)
- High affection (Gen VI+)
- Positive Exp. Point Power (Pass PowerGen V or O-PowerGen VI) is active
- Unevolved, but past level at which it evolves (Gen VI+)
- Catching wild Pokemon (Gen VI+)