Primary memory, also known as main memory, is used to store data and instructions that the CPU is currently processing. It has limited capacity and is volatile, meaning data is lost when power is turned off. RAM and ROM are types of primary memory. Secondary memory is used for permanent storage and includes hard disks, CDs, DVDs. It has larger capacity but is slower to access. Memory is organized in a hierarchy with registers being fastest, then RAM, and finally secondary storage being slowest but able to store the most data.