Instructions
Start any Pokemon battle using a Pokemon with status inflicting attacks that can incapacitate the other Pokemon. For example, Jigglypuff's Sing ability can put an enemy Pokemon to sleep.
Switch to Magikarp while the enemy Pokemon is incapacitated and utilize whichever attacks you currently have. At early levels, Magikarp can only use Splash, which does nothing. At Level 15, Magikarp will learn Tackle, which does a minimal amount of damage.
Switch back to a Pokemon that can inflict damage before the enemy Pokemon can rejoin the battle to finish the fight. After the battle is finished, Magikarp will share the experience points for participating.
Continue to employ these strategies until you reach Level 20, at which point you have the option to evolve Magikarp. Confirm the evolution to obtain a Gyarados.