Main memory (RAM) is faster than secondary memory as it is directly accessible by the CPU. Secondary memory (hard disk, optical disks etc.) is slower than main memory but can store data permanently even when the power is turned off. The program and data of a game are stored on the secondary memory (hard disk) and parts are copied to main memory as needed when playing the game.