Typically a computers memory is used to store information TEMPORARILY. A computers hard-drive (by design) is used to store information indefinitely, and is considered a storage device.
Most information is stored on your memory (Very temporarily, milliseconds) then transferred to your hard-drive or erased. Ironically, in todays technology, the critical parts of the OS (For windows, it's Explorer, SVCHOST, ect.) are stored in the memory (RAM) which help performance and stability, since these components are being accessed, changed, all the time, it never stops, which is what RAM (AKA Random Access Memory) is good for. When you open Microsoft Word, for example, the programs essential files are loaded into the RAM, when you open a file, it too, is loaded into the RAM, when you save it, it saves the changes you've made to the file being stored in the RAM, when you close that file (Not the program) it is then written to the storage device (Hard Drive) and purged from the RAM. This is why when a computer freezes when saving, a file can become corrupted, because all the data had not been written to the storage device, where the file is located and saved.
Although a hard-drive was considered a memory device for a long while, because for that while, it was the ONLY memory a computer had. Up till 3-4 years ago is when the hard-drive was not considered a memory device because it had gone from being the only memory a computer had, to being a storage device, where files are stored indefinitely, and not purged when the system was shut down or restarted.