How do they work
HDD uses a writer/reader attached to a mechanical arm which moves very fast to the right location of the disk to read or write data while the platter ( where the data is stored ) spins also very fast, normally 7200 revolutions per minute. The technology in HDDs is magnetism.
SSD uses the NAND flash technology ( there is no mechanical movement involved ) which takes less time for gathering data than HDD that has to look everywhere on the disk and find the data blocks ( they may also be spread out on the disk which makes the search even slower ). SSD is just a bigger and more advanced version of a memory stick. There is a embedded processor inside SSD and it controls the data manipulation ( caching, cleaning, storing, retrieving ).
The comparison is made on avarage.
What HDD looks like inside