It is of two types: Random Access Memory (RAM) and Read Only Memory (ROM).
RAM (Volatile Memory)
Since it is a volatile memory, it doesn’t store instructions or data permanently. The moment when the computer is switched on, the instructions and data from the hard disk start getting stored in the RAM.
The data stored in the RAM is required by the CPU to perform the desired tasks. The moment the computer is shut down, RAM loses all the data.
ROM (Non-Volatile memory)
Since it is a non-volatile memory, it does not lose its programs or data that get written on it at the time of manufacture. Therefore, it is a permanent memory that has all important instructions and data that are required to perform important and much needed tasks like the boot process.