Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
This section of the site has guides on RNG mechanics. In the future, you can ask questions like this in the Simple Questions and Answers thread, but be sure to read the rules. This subforum is for competitive analysis writing.