Summarize this article:

This way, if for any reason a character faints, you will be able to hold a rematch. This will initiate a battle. Start using Fire, Flying, Normal and Poison based attacks. Regirock is a Rock-type Pokémon and will be strong against these attacks, meaning it will effectively lessen the chances that you will cause Regirock to faint, thereby terminating the battle. When Regirock’s HP is low enough, try to capture him using your Pokeballs. Dusk balls are recommended; however, should you fail to capture him within 30 turns, you should start using Timer balls. Timer balls are slightly more effective than Dusk balls, but require the player to have stayed in battle for 30 or more attempts.
Save the game. Talk to Regirock. Wear down Regirock’s HP. Capture Regirock.