Computer memory can be divided into primary and secondary memory. Primary memory, also called main memory, is directly accessible by the CPU and includes RAM and ROM. RAM is volatile and can be SRAM or DRAM, while ROM is non-volatile and includes PROM, EPROM, and EEPROM. Secondary memory refers to non-volatile storage devices like hard drives, solid state drives, USB drives, CDs, and DVDs that are not directly accessible by the CPU.