Since the very first Mainstream Pokemon Games, the easiest way one could catch a Legendary Pokemon, some of the strongest and most difficult Pokemon to capture, would be to use a Master Ball on it. However, since you really only receive one Master Ball in any Mainstream Pokemon Games, it is impossible to do so for every Legendary Pokemon you encounter. Instead, most players wait to use their Master Ball on the Strongest Legendary Pokemon within any Mainstream Pokemon Game, using a different (and successful) technique to help capture the remaining Legendary Pokemon.
This technique sees a player saving directly before facing a Legendary Pokemon, just in case they accidentally defeat the Legendary Pokemon so all is not lost. Once in battle with Legendary Pokemon, the goal is to lower the Pokemon's HP as low as possible without making it faint. From there, it is usually best to Paralyze the Legendary Pokemon, making it all the easier to catch. Causing the Legendary Pokemon to fall asleep will make it even easier to catch then when paralyzed, but since paralysis is permanent and slumber on lasts but a couple of turns, most players prefer to simply go the route of paralysis instead.
Once the Legendary Pokemon has been paralyzed and its Hit Points as low as one can get them without causing it to faint, all one must do is simply throw Ultra Ball are Ultra Ball at it until it is captured. Since since still may take a number of attempts, it is also wise to carry along loads of healing items so the Legendary Pokemon doesn't knock out all of the Pokemon a player has while trying to complete the capture.