Instructions
Enter the theater in the center of Ecruteak City.
Talk to the Team Galactic Grunt who harasses the dancer on stage and defeat his Level 12 Koffing when he challenges you to a battle.
Leave the theater and accept Surf (HM03) from the old man who talks to you.
Pause the game and select "Bag" from the options menu. Select the HM03 item and teach it to a water type Pokémon in your party.
Defeat Morty at the Ecruteak gym and gain the Fog Badge.
Approach a shoreline with a Pokémon who knows Surf in your party and press "A." Confirm you want to use that Pokémon to surf to start surfing.