If the song is playing
Use a song recognition tool while it plays. Press Listen to music on HumFinder and hold your device near the sound. If it knows the song, it shows the title and the artist, and links to where you can listen. A recognition app like Shazam works the same way and knows far more popular songs.
If you only remember the tune
Hum it. On HumFinder, press Hum a tune and hum for about ten seconds, then play the closest matches to check. The Google app can also search by humming.
If you remember some words
Put the words you're sure of in quotation marks and add the word lyrics. Short, unusual phrases work better than the chorus of a song with common words. Check the writing credits too, because the person who wrote a song isn't always the person singing your version.
If it's from a film, a show or an advert
Search for the title with the word soundtrack, or the brand with the word advert and the year. Fan sites and soundtrack listings often name every song, scene by scene.
If there are several versions
Many songs have been recorded by more than one singer. Once you have a title, listen to a few versions until the voice matches the one you heard.