Those are two different types of memory.
RAM is volatile. As soon as your PC loses power everything that is stored in RAM is lost. This is known as "primary storage"
Hard Drives are non-volatile. Once something has been written to a hard drive it is there until it is overwritten. This is known as "secondary storage"
So what's the difference? Speed
RAM is extremely fast. It's like looking at a blackboard, everything is there infront of you and easy to find.
Hard drives are slow. They're a lot like a textbook, everything is in there but you'll have to look in the index first to find it and then sift through the pages until you get to the right spot.
The hard drive can hold a lot more data then the RAM, but the RAM can produce data roughly 500-1000 times faster.
There are other types of primary storage such as cache memory which exists on the CPU and other types of secondary storage such as optical media, solid state devices and tape drives.
Hope this helped!