Removing the lead guitar from a stereo mix of a song can be useful for a number of reasons. It can help guitar players to learn and memorize guitar solos by bringing their sound to the front of the mix and forcing them to play without the aid of the original solo. It can also be performed to create karaoke-like versions of songs for guitar playing instead of singing. Removing the lead guitar from a song can be done with any standard audio editor in just a few steps, and is particularly effective when the guitar is panned down the middle of the mix.
Open the song containing the lead guitar in an audio editing program. One popular audio editor is Audacity, which is both free to use and open source. There are commercial options available as well, but Audacity has many of the same features and is more than sufficient for removing lead guitar from a mix.
Split the stereo mix into two mono tracks. The way you do this will vary depending on the software you are using. In Audacity, simply click the arrow next to the track name and select "Split Stereo Track." Make sure to leave the two tracks panned to their respective channels.
Flip one of the mono tracks by selecting it and applying the "invert" or "inverse" effect. By doing so, any sounds that were panned to the center of the mix get subtracted, leaving only the sounds which were unique to the left and right channels. Unfortunately, this may also remove any other sounds which are also panned down the center.
Mix the two mono tracks back into a stereo mix and export it to an audio file. The resulting file should have the lead guitar removed.
Some advanced audio editors contain a "remove vocals" function. It may be worth trying this since vocals are removed in the same way that lead guitars are.