I think you get it from one of the gym leaders. Sorry if i'm wrong i haven't played that game in a while.
Celestic Town
its suppose to be surf
there is no dive HM in DP but the water related ones are surf and waterfall
cynthias grand mother will give it to you after you save there village from a bomb
surf is a hm. It is unlimited.
go to celestic town enter in the cave talk to the woman and you have the hm surf
surf left of jubilife to canalave
Read the inscription at the back of the Celestic Town Ruins, the Village Elder will join you and give you the Surf HM.
on Pokemon dimond there isn't a move caled dive. but there are a hm called surf and waterfall.you cant
Surf and Rock Climb.
go to canalave city and challenge the gym leader
The HM's are called Cut, Rock Smash, Surf, Waterfall, Fly, Rock Climb, Strength, and Defog.