HDD (Hard Disk Drive) and SSD (Solid State Drive) are both types of drives, or long term storage. But they differ a lot in how they function.
A mechanical hard disk drive functions similar to a record player. Information is stored magnetically in a metal disk that spins very rapidly and a mechanical arm moves to read and write data to the disk. It's called a mechanical drive since there are moving parts inside. Both the disk and the mechanical arm are very sensitive to movement, so ideally a mechanical hard drive should only be moved when powered off.
An SSD on the other hand does not have any mechanical parts, which is hinted at in the name Solid State Drive. Instead, it stores data in electronic circuits (flash memory). The technology in an SSD is essentially the same as in USB flash memory or SD cards. Unlike a hard drive, the SSD can be moved when powered on without any risk of damaging it, which is partly why laptops were the first type of computer where SSDs saw widespread adoption when the technology was new.
Since hard disk drives have a mechanical arm that has to move in order to read files from the disk, they function at their best when dealing with large files that are stored in one place, such as large video files. An SSD can read many small files spread out, which is often the case for games or the operating system itself.
In practice, SSDs are most commonly used for storing files you use daily such as applications or games. HDDs are mainly used for storing large files like videos, music collections, or photo albums.