Computer memory can be classified as primary or secondary memory. Primary memory, like RAM and ROM, holds data and instructions temporarily and is directly accessible by the CPU. RAM is volatile and stores active data, applications, and the operating system. ROM is non-volatile and stores basic startup instructions. Secondary memory, like hard disks, stores data permanently but is slower to access. It is used to store programs and data long-term, transfer data between computers, and back up information. Memory is measured in units like bits, bytes, kilobytes, and gigabytes.