Find the name of the song. If you aren't sure, but can remember some of the lyrics, search using quotations to frame a memorable line of the song. Use one of the more advanced search engines like Google, Yahoo or Bing.
Next, search for the song title. Chances are that you will find the title of the movie the song was in within the top ten results.
Use the Internet Movie Database at IMDB.com. IMDB has a Soundtracks Browser, which allows you to search for partial or full song titles. (Note: if you're searching with a partial title, song title words must be in same order as they appear on the soundtrack. If in doubt, search for one key word at a time.)
Access an online soundtrack database. The Soundtrack Info Project allows you to search by song, as well as by composer and performer. STLyrics.com lets you search its soundtrack database by a line in a song, and also features an artist database.