Below is a list of all the current ways you can earn XP and level up in Pokemon Go

XP AwardRequirement
0-50Train at a Gym
10Curveball Bonus
10Nice! throw bonus
50Great! throw bonus
100Excellent! throw bonus
50Visit a Pokestop
100Visit a large Pokestop
50Beat every Pokemon at a gym
100Successful  capture a Pokemon
150Win a Gym battle against 1 Pokemon
250Win a Gym battle against 2 Pokemon
350Win a Gym battle against 3 Pokemon
450Win a Gym battle against 4 Pokemon
100Catch 100 Pokemon of a species
500Add new Pokemon to Pokedex
500Evolve a Pokemon
1000Evolve a Pokemon a 2nd time
200Hatch an Egg (2 km)
500Hatch an Egg (5 km)
1000Hatch an Egg (10 km)