“Playing by ear” sounds like some sort of novelty trick in which you grab your guitar, hold it against the side of your head, and pluck the strings with your ear lobe. Although it is true that Jimi Hendrix could actually play guitar very well by picking the strings with his teeth, I've yet to see or hear evidence that he played by ear in a physical sense. However, he did play by ear in the abstract sense. Playing by ear really just means to be able to play an instrument based on your ability to identify notes or chords by listening or imagining them and knowing (or at least having a good idea) where to play them on a particular instrument.
There is a lot to be said for taking formal music lessons. By formal I mean studying music theory, or a particular instrument, face to face with a qualified teacher. Being able to read music charts (sheet music) is extremely useful. Wouldn't it be cool if you could play any piece of music placed in front of you at the drop of a hat? Of course it would! However, I want to point out two things: First, I've seen far too many people who received a guitar for Christmas (along with a coupon for 3 free guitar lessons) who quit after one or two lessons because they weren't learning cool stuff fast enough. The teacher made them play “Three Blind Mice” over and over again, and the pupil couldn't imagine how that could possibly lead them into playing “Smoke On The Water” or “Sunshine Of Your Love” or “Stairway To Heaven” or whatever their favorite guitar song happens to be.
Second, many formally educated musicians cannot play without having music sheets in front of them. They have not been taught to improvise and play by ear, and even if they have, they were only taught what notes can be played in any given key signature, without being taught how to express and improvise from their heart and soul when playing any genre of music.
After reading all (or, at least some) of these lessons, I would strongly encourage you to find a good teacher and take formal lessons. I emphasize “after” because learning to play by ear broadens your knowledge and appreciation of music, and it sparks your imagination. At the very least, I hope these lessons will give you a head start, regardless of whether or not you decide to take formal lessons.
There is obviously a difference between learning how to play and “practicing”. “Learning” involves acquiring knowledge, and “practicing” is the repetitive effort of using that knowledge to develop your skill and technique. It is important to remember that those two endeavors fuel each other. If you learn something, it is always more rewarding to use that knowledge in a practical way, and, if you see improvement of your skill by practicing, it inspires you to learn more. Ideally, that cycle never ends. Learning and practicing don't have to be dull, torturous, and separate endeavors. You will probably find both efforts more productive and inspiring if you mix learning and practicing in equal portions. As your skill and technique improve, you will automatically adjust the mixture of those ingredients to match your level of knowledge and experience.
Most people can't afford to spend 6 hours practicing guitar every day. I hope, and strongly suggest, that -as often as possible - you will make time for studying the material here and set aside an equal amount of time for practicing. Whatever the amount of time you spend always remember: Regardless of whether you are studying, listening, or practicing - Music should never be a chore.
Some people are naturally more adept at listening to music and breaking it down into its' fundamental components. The rest of us have to train our ears to listen carefully to find what we want, or need, to hear. Careful listening is essential to learning how to play by ear and I will try to provide you with some helpful tips and resources for improving your listening skills along with other practical guitar and music theory. Before you indulge in those things, you should first feel comfortable with your instrument. That is where we will begin.