>>15449635RAM is "Random-Access Memory", "ROM" is "Read-Only Memory".
A game cart is completely in ROM. The data is hard-coded into the cart itself. It can't be changed.
RAM is sort of like a, I guess you might say "temporary hard drive", albeit one which is Solid State and therefore incredibly fast. ROM, on the other hand, is much slower.
In order to make software run smoothly, what a game will do is load an amount of data into RAM in a batch (you'll often recognize this process in video games by a "loading..." screen), where it is temporarily stored. The game will then call this data as it needs it, and calling it will be very quick. This allows the game to run smoothly for significant stretches of time.
When this data is no longer useful, the game will dump it from RAM, effectively "deleting" it from that temporary hard drive, in order to call different data. This is one reason why computers with more RAM can run games better in certain circumstances; the game can load more shit at a go, and therefore spends less time loading and unloading data. This is also, incidentally, why devices with purely solid state hard drives are fast as fuck.
In our instance, Pokemon cuts down on the load time for random encounters by pre-loading the random encounter table for each area into RAM. If it didn't do this, then the game would have to manually call that data up from the ROM every time you entered a random encounter, thus slowing the game down considerably. By loading the entire encounter table at once, it can effectively take multiple loading processes and compress them into a single loading process, thus making the game run more smoothly.
Of course, once that data is loaded into RAM, someone who can read/write the RAM can see it (if he can recognize it in the string of hex values that he's actually looking at) and therefore modify it.