How do you catch rayqaza in Pokemon?

You can lower its HP and then use an Ultra Ball. If you don't want to waste a lot of time with it, you can always use the Master Ball, but it's not necessary.
Go to the Sky Pillar on Route 131.