Here's how to get it:
1. Defeat the Bugsy: You need to defeat the Bugsy in the Azalea Town Gym.
2. Talk to Kurt: After defeating Bugsy, head to Kurt's house and speak to him. He'll give you HM Strength.
Remember that you need to equip HM Strength to a Pokemon that knows the move before you can use it to push boulders.