Memory Basics
If your computer's CPU had to constantly access the hard drive to retrieve every piece of data it needs, it would operate very slowly. When the information is kept in memory, the CPU can access it much more quickly.
 
                      CPU
Register
                     
      Cache           Cache               Temporary
Storage
Areas
            Level 1        
                Level 2               
                   RAM                 
    Physical RAM Virtual Memory    
Storage Device Types
  ROM / BIOS Removable Drives Network/
Internet Storage
Hard Drive Permanent
Storage Areas
Input Sources
Keyboard Mouse Removable
Media
Scanner/Camera/
Mic/Video
Remote
Source
Other
Sources

As you can see above, the CPU accesses memory according to a distinct hierarchy. Most data goes in random access memory (RAM) first. The CPU then stores pieces of data it will need to access, often in a cache, and maintains certain special instructions in the register.

All of the components in your computer, such as the CPU, the hard drive and the operating system, work together as a team, and memory is one of the most essential parts of this team.