A hard drive (HDD) is a type of storage medium used in computers to store, for example, an operating system, applications, and data. The term "hard drive" is often used to describe both HDDs and SSDs, but technically, the term only applies to HDDs.
Hard drives use a spinning disk (platter) with a magnetic coating. A magnetic read/write "head" moves across the disk and writes a 1 or 0 (so-called "bits") as magnetic north or south on a very small segment of the disk.
Data is then read by the "head" returning to the same section and determining, based on whether it's magnetic north or south, whether a 1 or 0 is being read. A modern hard drive can easily store more than a trillion of these bits on a disk.
Hard drives are typically used for bulk storage where speed is less of a priority compared to cost. An HDD costs less per GB of storage than other storage media.