Computer memory can be classified as primary or secondary memory. Primary memory, also called main memory, is located directly on the motherboard and includes RAM and ROM. RAM is used for temporary storage and needs power to retain data, while ROM permanently stores basic startup instructions. Secondary memory, used for long-term storage, includes magnetic tapes, disks, and optical disks like CDs and DVDs, which allow large amounts of data to be stored externally to the computer's main components. Common units for measuring computer memory are bits, bytes, kilobytes, megabytes, gigabytes, and terabytes.