If we're talking about you as a human trainer playing a Pokemon game, then logistically all you'd do is use switch training and get the Magikarp levelled up that way.
If we're talking about within the Pokemon universe, then here's an explanation. Splash is useless in battle, but:
Platinum, BW, B2W2 dex entry
>A Magikarp living for many years can leap a mountain using Splash. The move remains useless, though.
Diamond dex entry
>It is said to be the world's weakest Pokémon. No one knows why it has managed to survive
But then, there are cases where it doesn't survive...
SS dex entry
>For no reason, it jumps and splashes about, making it easy for predators like Pidgeotto to catch it mid-jump.
Sooo... to answer your question, most Magikarp probably don't make it. That's why there are so many of them, like in real life where animals - notably water creatures such as salmon, frogs, octopuses - lay a lot of eggs so it increases the chance of at least a few surviving. However, an older Magikarp's Splash is exceptional and allows to escape from predators by splashing (hopping, as the Japanese name for it is) away from them, since its Splash is so powerful it can carry it long distances. That's the most logical reason as to how the species survive, since there are so many of them that they outnumber how much their predators can eat, and the older ones become tougher & are capable of Splashing away from their predators.
Magikarp