A computer uses a hierarchy of internal and external memory systems. Internal memory includes RAM, ROM, and cache, which provide fast access but are more expensive per byte. RAM allows independent access to each memory location and is used for main memory. ROM permanently stores data and is used for boot programs. Cached memory uses SRAM for faster access than RAM. External memory includes hard disks and USB drives, which provide large, inexpensive storage but are much slower to access.