What are different types of computer data storage?
Generally storage types divided into 2 types, primary and secondary. Main difference between them primary units are located close to CPU or inside CPU (like registers), where secondary units are located farther. Primary units are faster but with less volume, secondary units have more volume, but slower than primary ones.
CPU registers are being the fastest among primary storage, they help to save instructions, memory addresses and act as counters for cpu. Also registers used to pass data and temporarily save data coming from ALU and memory/data bus. The second fastest memory is processor's cache memory, it have more memory than registers but slower than them. Modern cpu architectures use cache some more data from RAM and pass it to registers, that way we have something in middle faster than RAM and larger than registers.
RAM is also primary storage, similar to CPU registers and CPU cache is volatile - which means loses all of data after computer has lost energy source or shut down. It's the slowest of all primary storage and the largest one. It's connected to CPU using address and data bus. To give a basic idea about RAM - program that executes at them moment it coming as an instructions from RAM to CPU by the order or instructions set by programmer. For example, Windows OS, Adobe Photoshop or any other program first loaded to RAM.
Secondary memories are far more slower than primary ones, they are non-volatile (they don't need electricity to store data). But secondary memories has larger volume. We can group internal and external storage. Internal secondary storage is often called hard disk, this is mainly data is stored and they are online ( you don't need to connect anything to computer), just turn on computer. Hard disks generally use magnetic disks or solid state storage technology. Each has it's own advantages, magnetic disks is cheaper so generally come with more volume. Solid State Storage has less volume, but it is faster, and generally last longer. Also when used SSD computer boots more quickly. External devices like CD/DVD devices use optical technology, it has more latency, it takes longer input/output operations. But advantage is data is portable and you can connect to any computer.
There is one more technology that's currently under development, called Intel Optane which is anticipated to be the best memory technology, advertised as a device that can handle 5-8 times more IO operations and 40 times quicker response time under constant load. Intel Optane has both properties - being non volatile as secondary memory and nearly as fast as primary memory.
Also we have to note that external devices are not online - which means you have to connect device to computer to access data inside each time you need, examples are external hard discs, floppy discs, punch cards, cd/dvd/blue ray devices, memory card, memory stick.. etc.
Another kind of storage is tertiary storage, they are not used in personal computers. They are not efficient because they are stored offline tapes and when needed robotic connector searches and connects tape that we have information. This way storage also called nearline storage (generally offline, but can be online when needed without human intervention).