To increase Trainer Level, you have to earn Experience Point (XP). There are various ways to gain XP.
Bonus XP Chart
Action
XP Gained
Capturing Pokemon
100XP
Getting New Pokemon
500XP
Evolving Pokemon
500XP
Hatching an Egg
100XP per km
Spinning PokeStop
50XP
Defeating Pokemon at Gym
100XP per Pokemon defeated
Gym Training
Varies based on CP difference
500XP by Catching New Pokemon
Basically, you can gain XP by catching Pokemon. 100XP is for capturing Pokemon and 500XP is for getting new Pokemon. Additionally, you can get XP based on how you throw Poke ball.
Capture Bonuses and XP Gained
Capture Bonues
XP Gained
Excellent
100XP
Great
50XP
Nice
10XP
Curve Ball
10XP
Catching Pokemon
100XP
Catching New Pokemon
500XP
50XP by Spinning PokeStop
You can gain 50XP by spinning PokeStop. To spin it again, you have to wait 5 minutes. To earn XP effectively, you may walk around a street where some PokeStops are located.
You can get candy and XP by transferring Pokemon to Professor Willow. Note that the Pokemon sent cannot be taken back to you.
Hatching an Egg
You can earn XP by hatching Eggs. Gained XP is based on the distance you walked for hatching: 100XP per km and max gained XP for a hatching is 1000XP. If you have multiple incubators, you can hatching some eggs simultaneously.
Winning a Gym Trainning
You can train your Pokemon and gain XP at Gyms that is owned by your team. The amount of gained XP is based on the number of Pokemon you defeat. To earn XP easily and faster, you may visit a Gym which has many Pokemon with lower CP.
Like training Pokemon in a friendly Gym, you can earn XP by winning Gym battles. The amount of gained XP is based on the number of Pokemon your Pokemon beat down. Even if you lose the battle, you XP is given to you.
Using a Lucky Egg
Lucky Eggs doubles XP points you gain for 30 minutes. To use Lucky Eggs effectively, you may do some preparations such as having eggs ready to hatch and stocking Pokemon ready to evolve.
Example Strategy to Earn XP
A Day You Do not Walk Much
Recommended actions
Using Lucky Eggs
Visiting Gyms to Battle
Training Pokemon in a Gym
You may want to earn XP in a Gym on a day you do not walk much. You can also get PokeCoins.
A Day You Walk a Lot
Recommended actions
Using Lucky Eggs
Spinning PokeStop
Hatching Eggs
You may want to spin PokeStops while having eggs to hatch on a day you walk a lot. To save time, avoid getting Pokemon you have already captured.