To receive trainer experience and increase your trainer level, you will need to:
- Win NPC Battles (Trainers, Gym Leaders, Elite 4 + Champion, …)
- Complete Achievements
- Daily Bosses & Quests
The best place to level up your end-game Pokémon is Cerulean Cave for Kanto, and Victory Road for Johto.
For lower level Pokémon, it’s advised to do switch training in these areas, as the wild Pokémon there located are high levelled (~40-ish for Victory Road, ~50-ish in Cerulean Cave, some even reaching 60).