So maybe the trickiest thing to put into rp terms, but the easiest way to gain levels. Pokemon's experience all have the same base. Experience rewarded per pokemon is what changes. As long as the pokemon participates in battle, it will gain experience. However, there are pluses and minuses to the amount gained depending on the circumstance. Also, exp is given with a set number x the level of the pokemon. (So Magikarp has an Exp drop of 5. The experience for a level 10 Magikarp would be 5 x 10 which is 50 Exp.)
Rewarding Experience
Pokemon defeated foe's pokemon (No Switch Out): Normal Exp Drop
Pokemon participated and did not faint (A.K.A Switch Out): Half Exp Drop, divide by how many pokemon participated against the single foe.
Pokemon fainted (Your Own): 1/4 Exp Drop
Defeated trainer pokemon: Double Exp Drop (Switch Out rule still occurs)
Against the odds (Lv. difference more than 10): Plus 100 exp for every level over 10 from current pokemon.
Captured Pokemon: 1/2 Exp Drop
*The reason pokemon still get Exp from capturing a pokemon is because they still participated in a battle. It's valuable experience regardless.*
Now Trainers!
You don't gain experience like pokemon do, but your trainer rank does go up for several reasons. They will be listed below.
Trainer Ranks: E, F, D, C, B, A, S
League Contender: For every three gym badges you collect, and the final badge, your rank goes up 1. You can go up a total of 3 ranks in this way.
League Champion: Defeat the Elite 4 and the Champion to gain an automatic Rank A. If you are already A, you're rank will be moved to S until you are defeated.
Spotlight Attractor: Participate in and have an active role in an event to gain 1 trainer rank.
Pokemon Curiosity: Capture at least 10 pokemon. 1 Trainer Rank.
Pokemon Enthusiast: Capture at least 40 pokemon. 1 Trainer Rank.
Fist to Fist: Battle and win against 10 npc trainers. 1 Trainer Rank.
Blade to Blade: Battle and win against 20 npc trainers. 1 Trainer Rank.
Legend Seeker: Capture 1 legendary pokemon. 1 Trainer Rank.
Title Shot: When having a stakes battle against another rp'er. Winner gains 1 Trainer Rank (Limit A) and loser loses 1 Trainer Rank.
General Merit: For outstanding rp'ing, you could be rewarded Trainer Ranks. 1 per merit.
Just like you can gain ranks, you can lose them as well.
Laughing Stock: Whenever you lose a gym battle, your rank goes down 1.
Too Persistent: If you lose more than once to the Elite 4 or Champion, you rank will go down 1 per encounter.
Face to Floor: If you lose to 5 npc trainers, you will lose 1 trainer rank.
Loser: If you are an unfair rp'er, or are generally causing mishap, first warning is a RESET trainer rank straight back to E. After that, you may be banned.
Pokemon are not on pause just because they battle. They will gain levels, learn new attacks, and even evolve during battle if conditions are met. However, to evolve a pokemon during a battle, you will need approval from an admin or mod.
NOTE: It is up to the trainer to keep track of their personal goals, experience, and battles. You can miss out on a lot if you're not studious with your training.