RNG stands for Random Number Generator. Random Number Generators are basically pieces of software that remove any predictability. In short, an RNG creates randomness. RNGs are implemented in video games that require a particular outcome to be completely random. A basic example is rolling virtual dice. If a video game has a feature that allows players to roll virtual dice, then there is no fun if the outcome is predictable. Some gamers will even figure out a way to exploit the system and get the desired outcome every time.
RNGs are not just used for simple things like rolling virtual dice. One of the most common places that modern games use RNGs is the case opening or loot box opening system. For example, the Rainbow Six Siege “Alpha Packs” or the CSGO “Skin Cases” both use some kind of RNG that decides what skin you will get. This way the chance of you getting a particular skin is completely random. However, developers do program these RNGs to have better odds on low-tier skis to make the higher-tier skins rarer.
Another common place where RNGs are used is open-world and battle royale video games. For example, if you are playing Red Dead Redemption 2 and are in a lake, there is no telling whether you will see an alligator or not. Or if you are playing Apex Legends, the RNG makes sure that the loot you receive is completely random. It makes video games fair and fun for everyone.