Memory is mainly two types:
1. Primary Memory / Volatile Memory.
2. Secondary Memory / Non Volatile Memory.
Primary Memory provides the main working space for the computer. (RAM)
It's Volatile and temporary because when the power goes down its data is lost.
Secondary Memory is Non Volatile. It keeps data even if power is not provided.
(Hard Disks, CD ROM and Memory Sticks )
Computer memory
How computer memory works?