How do you get your Pokemon to smash rocks in platinum?

A hiker, when you enter Mount Coronet in the beginning of the game, gives you the HM rock smash. Outside of battle this will allow you to break rocks. You can't use this until you defeat Roark of the Oreburgh city gym.