Surf

To swim, just order a Pokémon with 'Surf' at the edge from somewhere that contains water, after that walk to the Pokémon.
 
To leave, repeat the same process.