Learning to play an instrument is not an easy task. To be able to master the instrument, you need to practice and practice. Initially, the notes and chords do not have meaning and how they are produced will be something that you have to struggle to perfect. After a few weeks, you get the hang of it all and realize that anyone can learn to play the instrument.
Some people are lucky though because they have good senses. They can play the tune again even if they heard it once. They are the ones whom people would say can “play widow”. This is a common term especially with those learning the piano. What playing widow means is that there is no need for notes but they play by listening to the music and relate it to the instrument.
You can “play widow” too if you devote some time to learning how to. The most important step is to be familiar with the music your guitar can produce. Practice and learning the song well can make you recognize the tune better.
Try to learn simple songs at first if you want to start playing by ear. With simple songs, the scales are simpler and less sharps and flats and there is lesser chord. Most probably the chords will be repetitions which I easier to handle.
Listen to a song then play it on the guitar. It might surprise you that you can get into the chords and interpret the song well. You are not yet free styling initially but there will come a time that you can be reasonably sure of the note values. If you can successful give the notes the correct value then that will assist you to play the song cleaner and clearer.
Playing by ear is one skill that not all people have. Do not try to analyze why you can and just practice and practice until this becomes a second nature to you.
A good start is finding a song’s key. Once you are sure of the first and last chord then it will be easy to fill the gaps in between. What you need to do is find the root note first then move on to the next until you have completed the whole song. There might be a need to adjust tuning so do so. With the root note as your guide, you can try the major and minor chords then other chord that play with the root note.