Also, who do you beat to use it?
go get the 5 badge and go to the gym of 5 bade and beside it there was a house. Go inside the house and find wally's dad and he will give you HM2 thats the surf.
You obtain Surf by beating Petalburg Gym's Leader (your dad). Once you beat him, Wally's Dad will come in and take you to his house to give you Surf.
Note: Petalburg Gym is the 5th Gym Badge