Instructions
Play the game until you have received the National Pokedex. You get this automatically after you have seen all 150 Pokemon in the Sinnoh region. Then speak to Professor Rowan.
Travel to Pastoria City and enter the Great Marsh found in the northern section. The Great Marsh works like the Safari Zone in previous Pokemon games. It costs 500 credits to enter and you only have 500 steps before you have to leave. You also receive 30 Safari Balls.
Enter the building in the Great Marsh and go up to the second floor. Stand in front of the binoculars you see there and press the "A" button to use them. You will receive a message stating which Pokemon you can see. Keep using the binoculars until you spot a Yanma. Their location and chance of seeing them changes daily, so keep trying until you get lucky.
Leave the building, then go to the area in the Marsh where you were told the Yanma are located. Throw your Safari Ball at a Yanma when you encounter it in order to capture it.