As the computer boots, parts of the operating system and drivers are loaded into memory, which allows the CPU to process the instructions faster and speeds up the boot process. After the operating system has loaded, each program you open, such as the¬†browser you’re using to view this page, is loaded into memory while it is running. If too many programs are open the computer will swap the data in the memory between the RAM and the hard disk drive.

For more information click here