you get it from the elder in celestic town after you defeat Cyrus in the shrine
Chat with our AI personalities
Go to a body of water and click A. Choose yes to surf.
Celestic town shrine
Teach it the move Surf using HM3.
Swim isn't a move. Surf is, and most water types can. If you search "Surf" on bulbapedia.org, it will give you a more accurate list.
to catch mesprit in pokemon platinum go to its cave(after beating team galatic and catching/defeating girantina)at lake verity use surf and swim to the cave in the middle. talk to mesprit and it will run away and oak will tell you after it and use your marking map to track it down. best strategy to catch it is get a pokemon with a move like mean look or make it go to sleep. also mesprit is level 50 like uxie and azelf