Instructions
Walk east on Route 221 to get to Pal Park. If you have the National Dex, the gate is open; otherwise, it is locked.
Speak with Professor Oak when you enter Pal Park. You get the PokeRadar. Exit Pal Park.
Fly or walk to Jubilife City. Leave Jubilife City via the western exit. Find a grass patch on Route 218.
Stand in the grass and use the PokeRadar. Certain grass patches around you start to shake.
Go to a shaking grass patch to fight the Pokemon hiding in it. At random, Ditto appears. Ditto is relatively defenseless before it uses Transform, so throw a Poke Ball at it immediately to catch it.