You teach Surf to your Pokemon using the HM03. You can get HM03 in Petalburg City:
First, you must have beat the Petalburg Gym Leader; note that you cannot fight him the first time you go to the town, you have to beat Flannery at Lavaridge first. Then go to Wally's house (also in Petalburg) and his father will give you Surf.
Chat with our AI personalities
The most easiest way to get a Pokemon that can surf is get a Zizagoon,it can learn surf.
Get the HM Surf then teach it to a pokemon.
Teach it the move Surf using HM3.
teach it the HM surf
Any water Pokemon besides magikarp and also linoone can learn surf as well.