You get it after you have defeated the New Elders in the Ferre Ruins, obtained the Precimos Island Gym Badge, have taken on the Burglars in the Precimos Hotel (every single one of them), obtained the Tablet Idol from the sleeping man, fought your Rival, and then gone to the Diving Tours building in Precimos Island and gone on a tour with your rival.