Instructions
Travel to Jubilife City, north of Route 202. Speak with Dawn and cycle through the conversation, after which you are free to roam the city.
Walk left to the small building and enter it to find two men; talk to them. One of the men gives you the Old Rod, a fishing rod you can use to catch Pokemon in the water. Exit the building after getting the Old Rod.
Walk to the water on the left side of the town and use the Old Rod to go fishing. Finding a yellow Magikarp is a matter of patience, as the majority of the Pokemon you find in the water will primarily be red Magikarp. Continue fishing until you pull out a yellow Magikarp surrounded by stars and accompanied by a sound effect.
Attack the Magikarp with your Pokemon's special attacks but do not defeat it. Throw a Poke Ball at the Magikarp when it's health is low to capture it and store it's information in your Pokedex.