You get HM07 Dive from Steven after you obtain the Mind Badge for defeating Gym Leaders Liza and Tate. Liza and Tate are the Gym Leaders in Mossdeep City, which is accessible by surfing east of Lilycove City.
Dive is used to explore underwater trenches located all over Hoenn. These underwater routes will be how you access locations like Seafloor Cavern and Sootopolis City. You can also encounter Pokémon only found underwater like Clamperl.
HM07 Dive Location
To be able to challenge Liza and Tate in Mossdeep City, you should have beaten Team Aqua/Magma’s Admins in their hideout near Lilycove City. If you’ve done that, you are now free to explore the various water routes east of Liycove City.
Your next destination is Mossdeep City. Gym Leaders Liza and Tate will be waiting for you over at their Gym. If you don’t know where Mossdeep City Gym is, here’s how to get to there:
Step 1: Start at Lilycove City’s coast on the right side
Step 2: Continue surfing east past Route 124
Step 3: Land and go up the stairs
Step 4: Head northeast and you’ll eventually reach the Gym
When you beat the twins in a battle, head outside, and a cutscene will play. You will eventually end up in Steven’s house, where he’ll give you the HM07 Dive and the Devon Scuba Gear.
Using HM07 Dive Outside of Combat
In battle, Dive is a two-turn water-type move similar to Fly. It’s not especially good, so you might as well let an HM Slave learn this move.
Tip: Pokémon like Pelipper are especially useful HM Slaves in the game as they can learn Fly and all three water-type HMs: Surf, Dive, and Waterfall.
Outside combat, use this HM to dive underwater in specific locations. The locations where you can use Dive will be indicated by darker spots in the water across Hoenn.
After you let a Pokémon learn HM07 Dive, you’re set to explore your next destination over at Seafloor Cavern. You’ll also eventually need to use Dive again when you enter Sootopolis City, whose entrance can only be accessed through Dive.
Here’s how to get to Seafloor Cavern, where you’ll get to use your newly acquired HM:
Step 1: Fly to Route 128
Step 2: Surf west until you see this diving spot
Step 3: Dive and go inside the cave, then return to the surface.
Step 4: Surf north and enter the cave.