The Dive HM is a move that allows you to explore underwater areas. However, in the Mystery Dungeon games, the underwater areas are typically accessed through specific events or storyline progression.
Instead of learning Dive, some Pokemon may have the ability to "swim" or move through water in specific areas, but this is usually tied to the game's plot and not a learnable move.