You need a mechanical license agreement if you are planning to do the following:
1.) You are planning to cover a song written by another songwriter and sell it on a CD or any mechanical forms of recording (vinyl, cassette tape).
2.) You are a movie producer and you plan to incorporate the song in the movie and distribute it on a CD, DVD, Blue ray, etc.
3.) You have mp3 songs in your computer and you plan to burn it on a CD and sell it to your friends or any of your customers.
4.) You are a recording label and you are releasing an album with songs written by someone else.
5.) You are a game software producer and want to include copyrighted music in the games.
6.) Or as long as you are using copyrighted music then distributing it in physical media such as CD, DVD, cassette, hard drive, etc as long as it is tangible, then you are required to get a mechanical license from the music publisher.
For those 6 items above, you need to ask permission from the music publisher (or an authorized third party representative, more details below). If the request is granted, the music publisher will then issue mechanical license. Aside from getting the license, you also need to pay associated mechanical license fee or royalties as stipulated on the agreement.
The mechanical license fee is mandated by law. And some computational information is probably needed in some cases.
Confusing aspects of mechanical license and the solutions
Some of the confusing aspects of mechanical licensing are to WHERE to get this license. Typically:
1.) If the songwriter is not affiliated with any third party music publisher or any mechanical licensing organization then the songwriter will have the role of music publisher and can issue a mechanical license.
Since this is a legal agreement, the songwriter needs the help of an entertainment lawyer to do this right.
2.) If the songwriter is affiliated with a music publisher, and the music publisher is NOT affiliated with any mechanical licensing agents, then the music publisher can execute mechanical licensing agreement in behalf of the songwriter.