Memorize or write down at least some of the song's lyrics--as soon as you hear it.
Write a series of keyword phrases that might help you identify the song. These three- or four-word word phrases should be sets of words that are part of a single phrase.
Choose phrases that are unusual. A phrase like “I want to,” for example, would likely produce an enormous number of songs in an Internet search containing that phrase.
Go to your favorite search engine. Type in one or more of the phrases you've chosen, placing each phrase in quotation marks. Assuming that you have chosen the correct phrases, and the song is well-known enough to be mentioned on the Internet, you will be able to find the name of the song and of the artist.
Go to a site that helps search for songs based on lyrics, such as Lyrics.Astraweb or Song Lyrics (see Resources). Use their search functions and your search terms to find the song and artist you're looking for.