Shazam is a very cool app. Just activate the app, keep your phone near a speaker and the app will tell you within a few seconds which song is playing including the album it comes from and links to download the track instantly to your phone.
Wanna know how it works? Then read this article on Gizmodo.
Link : Gizmodo – How Shazam Works To Identify (Nearly) Every Song You Throw At It