If you are recording a song that is copyrighted, you need to obtain what is called a "mechanical license". Here is some basic info on how to do this from Steve Suffet (which he posted recently on the Peoples Music Network listserv):
You can obtain a mechanical license for a song published in the USA by contacting the copyright holder, which is usually the publisher or the publisher's agent. If you are going to record the song as published, meaning not a parody and not a derivative work, the copyright holder must issue you what is called a compulsory license. However, the process is often complicated, beginning with finding out who the current copyright holder is.
You can avoid all these hassles if the song is listed with the Harry Fox Agency, which serves as the licensing agent for many publishers. Just go online to http://www.harryfox.com/ and follow the SONGFILE link. It might take you another two or three clicks, but you will eventually find the song. Just make sure it is the one you really want, because there are often two or more songs with the same title.
You can get your mechanical license online. The current fee is 9.1¢ per CD if the track runs 5 minutes or less, so 1,000 CDs costs $91. Harry Fox Agency then adds a $15 fee for itself, so the total for 1,000 CDs is $106. You pay by credit card or PayPal and you get you license online.
(reprinted by permission. Note that Steve is not a lawyer!)
A couple of final comments: If you want to sell mp3 files online through itunes, CDBaby, etc. you must license the song via a service like Harry Fox. Most songs by well-known artists or owned by music publishers are in fact handled through Harry Fox. Smaller lesser known songwriters are less likely to have registered their songs with Harry Fox.