A hard drive (or hard disk, or hard disk drive) is a storage device in a computer, and also some other types of equipment, that stores the information the computer uses (programs and data). The information on a hard drive doesn't go away when the computer is powered off.
A hard drive is not ROM (Read Only Memory). It can be both read and written to.
Think of a hard drive kind of like the computer's bookcase, information can be stored and retrieved but it takes a bit of time to get to it.
The other place where information is stored is in memory and is easily and quickly accessible, think of it sort of like a note taped to your screen. The information in memory does go away when the system is powered off.
For the case of a hard drive maybe, but Mac and Linux themselves are very different..
I typed "hard disk drives" instead of "hard drives" and it didn't accept my answer. It's basically the same thing.