Memory is divided into primary and secondary memory. Primary memory, also called main memory, is used for immediate data access by the processor and includes RAM and ROM. RAM is temporary storage that allows direct CPU access while ROM is permanent storage that retains data without power. Secondary memory provides permanent mass storage on devices like hard disks, and includes examples like magnetic tapes, floppy disks, USB drives, and solid state drives that retain data without power.