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.