The following are the differences between RAM and a storage device like a Hard Disk:
1. Speed: The difference between the speed of data transfer in RAM and HDD is comparatively huge. RAM communicates with the processor of your system, so it has a higher speed than HDD.
2. The data on RAM gets deleted once the computer is shutdown, but the data on the HDD stays even when the computer is shutdown.
3. Cost: Since the speed of RAM is way higher than the storage devices, it is priced higher than storage devices.
4. Size: There is no need for RAM to be of higher size because it doesn't need to store all the data on the computer, just the program that is opened. It is not the case with HDD where all the data is stored.
To make you understand the basic difference between RAM and HDD let me do it with an example:
Suppose, you work in an office and you have different tasks to do. You have different files in your drawer. When you need a particular file, you open the drawer, remove the file and keep it on your desktop. When you need another file, you do the same and keep it on your desk. If you feel that the files are needed regularly, you keep them on the desk itself until you finish the job.
If you put each file back in the drawer every time you complete a task, you will have to open/close the drawer multiple times. This may make your job slower.
This is the same with RAM and storage device. When you open a program in the computer, it is transferred to the RAM from hard disk. Now as long as this program is open, it is in the RAM and it communicates directly with the processor. It is difficult for the processor to directly communicate with the hard disk because the speed of hard disk is way slower than the processor. So, instead of making the processor wait for a response from HDD, RAM communicates with the processor and takes advantage of the higher speed.
Now there are many other concepts like what happens when you open a file or a program that has a higher size than the RAM size (example 2 GB) which is outside the scope of this question.
I hope this was useful to you.