How does Shazam work?

I use Shazam A LOT... And I've always wondered how it actually works.

Nowadays, it takes mere seconds for Shazam to identify a song, even in a noisy environment like a bar or nightclub.

Thanks to YouTube channel Real Engineering, we now know how Shazam identifies your favourite tracks so quickly.

It's VERY in-depth, so if you're impatient - Skip to 3:55 for the short explanation.