RNG stands for Random Number Generator, though its real term is Pseudo-Random Number Generator. Now to an average Joe playing through the game, things like a Pokemon IVs, what nature is has, how its stats are laid out, if it's a shiny Pokemon, etc. all looks to be completely random (this also goes for how damage calculation is done in Pokemon Battles concerning critical hits, a chance of inflicting a status ailment, etc. however what we're talking doesn't concern the RNG mechanics of Pokemon Battles). The problem is, computers cannot be programmed to be "random", computer programs can only follow commands. To get around this programmers do their best to make things appear random via a complex algorithm, most of the time pulling numbers from actions the user is doing. However with the introduction of the DS's internal clock (which remembers time, day, month, and year), Pokemon (and many other games) took advantage of it and based their RNG around that. However from doing that comes the chance to manipulate the RNG because you're able to change the time of the DS's clock. This is where things get complicated.
Honestly I have never messed with the RNG before and do not plan to. There are all sorts of guides online which tells you what you need to do to get a "perfect" Shiny Pokemon with a desired nature, though a lot of these guides also require you to use external devices in order to help you see the numbers the RNG is throwing around (you can do it without an external device, though I'm guessing it'll be much harder to do).
Now from reading this you're probably thinking "Would this be considered cheating?". And the answer to this is... up to debate. Pokemon created by manipulating the RNG are allowed in tournaments as it's technically possible to get that Pokemon the normal way (though it'll probably take many catching/hatching attempts). However because you're manipulating the internal system and might have used an external device to help, there are those who see it as cheating as you're skipping all the work a "legitimate" trainer would normally had to do and are pretty much playing Arceus by just creating your perfect Pokemon.
All in all, due to how complicated this is, you'll have to look up how to manipulate the RNG on your own. I won't leave you with nothing though, as soon as you're at a place which lets you visit game sites, Bulbapedia's page about RNG leads you to a few links on what you need to do to manipulate the RNG as well as give you more information about it.