Random Access Memory (RAM), is as the name suggests, it is a type of short-term memory that a computer can randomly access. Compared to normal memory, RAM memory tends to be a lot faster.
Picture this:
Let’s say that you want to run a game on a computer. You intialise it and the computer looks up the copy of the game in its long-term memory. At first, everything goes well as the opening cinematics and menus appear. However, as your character begins to do things in the game, the computer must constantly retrieve individual bits and files in the game folder that relate to what you are doing.
You turn toward the left, and the computer immediately looks up what that part of the game world should look like. You drink a cup of milk and the game looks up sound files and picture files for the drinking animation.
For you, these actions may follow some logic. To the computer however, they are completely random. This also means that the computer must be able to look up whatever information or data is needed at a moment’s notice.
For normal memory, this poses a problem. This is because normal hard drives and even faster solid state drives are simply too slow for the computer to retrieve so many seemingly random files at random instants.
This is where the RAM comes into play.
Most RAM today is ridiculously fast compared to normal memory. This allows the computer to retrieve whatever information it needs at a moment’s notice.
Most of the time, when you launch a program, say that game above, your computer makes a copy of that game from your normal drives and places it in RAM, where it can then access the copy at speeds that are simply impossible otherwise.
This is the function of RAM: To facilitate seemingly random requests that follow no easily predictable pattern in as quick as a time as possible.
The main disadvantages of modern day RAM however, is that RAM is much more expensive than normal drives and that RAM is volatile (meaning that if the power is cut, it loses all its data).