You go to your bag, go to the TM and HM section, boot up surf, teach it to a water Pokemon, and when you get to a body of water, select that Pokemon in then menu, and in blue letters, it should say surf, press a and say yes. Or, if your Pokemon already knows surf, go up to a body of water, press a on it, it should say "The water is a deep blue... Would you like to surf on it?" then select yes, then it says "(Pokemon) used surf."
Chat with our AI personalities
If you are talking about Defog(HM05), then you will have to beat Crasher Wake first in order to use it outside of battle. It is somewhere in the Great Marsh. In Platinum, it's Fantina, and after you beat her, you can use Surf.
You need the Fog Badge from Morty the Ecruteak Gym Leader in Ecruteak City before you can use Surf outside of battle.
You need the soul badge that is obtained from defeating the Fuschia city gym leader Koga in order to use surf outside of battle.
In Pokemon FireRed, the badge needed to surf is the Cascade Badge. This badge is obtained by defeating Misty, the Cerulean City Gym Leader. Once you have the Cascade Badge, you can use the move Surf outside of battle to navigate bodies of water and access new areas in the game.
To move a big boulder you need obtain the move Strength. To use the move outside of battle you need the Rainbow badge.