I just sit down with the recording, listen closely, and try to find the notes. Over the years, I've always done it the same way, and looking back, I think there are a couple key things I do that help.
First, I have always done it with my electric unplugged, in a very quiet room, with the song volume very low so I can hear my unplugged electric at the same time with the recording. Because after listening, and poking around, you want to try to play along where you can to see if it sounds right.
I think this point is important, because I couldn't imaging a noisy amp and then a loud recording and trying to listen closely. Plus the amp will have tonal qualities and/or effects which will really make it sound different. What you're striving for is to hear the true notes under the artists effects, and you learn to ignore the effects and see how it matches the notes your playing.
Secondly, it's so important to be precisely in tune. So when you find a note - hopefully one that sustains a while that you can tune to... or a steady bass line... you play along and see if you're in tune. Often the recording is slightly higher or lower... like 'in-between' 2 frets. If you slightly bend the string you can hear it go in tune. So then you ever so slightly tune that string to match up.
Common sense also comes into play. For example if the note is between A and Bb for example, and you learn to recognize the sound of the open strings, you may be able to hear and verify that it is in the key of A as it is an open A string and not Bb. So you tune A EXACTLY with the recording. Then you want to do the same of other strings, and keep refining your tuning of the whole guitar, until you are well in tune with the recording. Once you are, it makes finding the notes SO much easier.
Thirdly, find other notes coming through in the chords. At least determine if they are major or minor chords. After you have the chords, you can see the notes in the scale - the key of the song - which just comes from playing the notes that make up the chords. So then as you try to find the lead guitar parts you will go straight to the notes that are in the scale, and it will help you find them much faster.
These are just a few tips to learning guitar solos by ear that I hope you may find helpful.
I get this question a lot. First of all, it's not just the effects that make my sound , but also that I use direct recording to be edited into my videos. So what you hear in a computer digital recording or such is obviously different than an effect plugged into some kind of amplifier and/or speaker.
I used to go through a lot of BOSS pedals and then direct into my digital recorder. Now I use a small piece of equipment called a BOSS GT-001. It's got every effect in it you could imagine. So that really is not going to help you to understand how I get my tone.
There is no simple answer. It's a LOT of tweaking. When you have a multi effects unit, you have a LOT of settings. For example if you turn on compression, that has it's own tone setting, in addition to other settings. Then if you turn on distortion, THAT has it's own tone + gain, then EQ, tone again, pre-amp TONE again. Maybe in 2 places. Also my unit allows 2 channels - ie, 2 preamps at a time, each with their own gain, treble, mid, bass, speaker type, etc. You can spend hours and get nowhere. When you turn on a lot of things like compression and gain, distortion, it is also really important to tune in the noise suppressor to keep out any humming, especially when notes are not being played, but not too much to kill off all your sustain as the volume fades.
I play along with headphones with the original track and listen to the difference with my tone and the recordings tone. It's surprising how often I have too much distortion on for example.
So while I can tell you what effects I'm using, it's just not a simple answer to say, go get this, and you're all set. Again, the BOSS GT-001 is a multi effects processor, but there is still all the time to put in if you want to make your own sounds.
One other point is there is also some control of the tone and noise - or more lack of distortion noise - due to the players ability to control the strings as is needed.
Sometimes a simple solo can take me 15 or 20 minutes to learn, and I'll spend an hour tweaking my darn sound.
Oh one more thing, later on I found this unit does have some free downloadable effects that other professionals have created. I downloaded the Steve Lukather patches, which were GREAT, far better than anything I had done. Then I tweak those to more appropriate settings to use in videos, like maybe reducing the amount of delay. After saving a few of those off, I'm finding I don't need to spend so much time tweaking anymore!