hdd and ssd, the files are stored here. memory also store files but only temporarily. For the hdd/ssd even if you turned off the pc the files are still there. unlike those that are stored in the memory (volatile), but of course the programs handle this.
as long as you save your files, they will be there.