Instructions
Travel to Violet City.
Enter the Violet Gym. The gym is identified by the "Violet Gym" sign in front of it.
Defeat the gym leader Falkner. Falkner uses flying-type Pokemon, so any rock-type Pokemon will defeat them. Once Falkner is defeated, you will be able to use Rock Smash.
Travel to the northwest part of Violet City to the gatehouse.
Speak to the large man next to the giant Pokemon tree to receive Rock Smash.
Teach Rock Smash to a Pokemon by selecting HM 06 from the TMs/HMs menu of your inventory. Select a Pokemon to learn the move -- any Pokemon that can learn the move will say "Able" next to it.
Press "A" on any boulder to use Rock Smash and clear the boulder from your path.