A mechanical license grants an artist permission to reproduce and distribute a song someone else wrote (i.e. the lyrics, underlying melody and character of the song). For example, purchasing a mechanical license will legally cover an artist to record and distribute a cover of another artist's song, but cannot be used in the case of sampling, editing or changing the original work.
The most common use of a Mechanical License is when recording a cover song. This pays a royalty to the composer of the song for the right to use their song on the new audio recording you have produced.
Mechanical Licenses can be purchased from the owner or rights holder (i.e. music publisher or the original songwriter/s) of the song you wish to cover, or from an agency that represents a larger group of publishers. In the U.S. you can purchase a mechanical license from The Harry Fox Agency or Easy Song Licensing.