Regular practice and repetition of different notes and chords can help you develop your ear. Learning to play guitar becomes much easier when you can pick out which notes are in a song, what key that song is in, and what chords are involved.
Learning which notes are in a particular scale can help you identify the key of a song. In turn, that can help you narrow down what chords and notes are included in your favourite songs and how the artist decided to structure a riff or solo based on those scales.
Although learning to play by ear may seem difficult at first, with continued practice and actively listening to music, you can pick up songs by ear better over time. Over time, as you become more advanced, you can use this knowledge to play guitar solos in your favourite songs, or start building guitar solos of your own. I can help you develop these skills over a period of time.