How to Play any Instrument by Ear
Playing by ear is part of being a well rounded musician. Basically ""playing by ear" as the name indicates means playing something on your instrument heard by you ear. It is a very nice skill to have and we all have it in us, we just need a little bit of training. If you listen to a song, you may not sing the words but after hearing it you will most likely be able to "hum" with the song. That's why it's so easy to play by ear on the kazoo. You just hum the tone and you are playing. The problem isn't to know which note you should replicate (because you'll already have that down when the song goes on in your head) but to know where the tones are on your instrument. For example the piano has a lot of keys so hearing a tone and then finding the right key to replicate the tone can be difficult in the beginning.
Why you should learn playing by ear?
There should be a reason for putting your effort into this right? In my case it helps when I hear a cool random tune that just comes out of the blue, which I would like to play on the piano. If you really like a tune, but don't want to or can't use sheet music, playing by ear is the way to go my friend! By playing by ear you'll also get another kind of satisfaction from learning it because it's your way of playing it. You play the way you hear it and want it to sound, and not how it stood in the sheet. But making it sound like "something" or even "wow" you need to learn more than the melody. That's where you you'll have fun or get frustrated. I personally find it a lot easier to just make something up that sounds good than trying to read it in notes. It's probably because of my lack in sight reading. If you start getting the hangs of it and start making "WOW" accompaniments or even start composing, then if you read sheet music, you will notice that if you pretend that what you played stood in scores it would look more advanced than what you usually would play from scores.
How you should learn it?
If I wouldn't answer this question and you had to figure it out your self, what would you do? Try it out of course. The beauty of playing by ear is that you don't need anyone to teach you it. Now this hub sure lost its reason to be read. If you watch some videos of people playing an instrument, a lot of them play by ear because they may or may not read scores, and have taught them self how to play by ear. When so many people can play by ear it should be clear to you that it actually isn't that difficult.
You should be familiar with the scales on your instrument. Sure you can pull it off without knowing a singe scale at all, but it will make it much more difficult than it should be. If you can play a C major scale (all white keys on the piano) and want to play simple song as "Twinkle twinkle little star" that doesn't have any pitched notes (#/b) you should be able to tell that if you where playing in a C major scale you wouldn't try C# to check if that was in the melody. Wouldn't it be easier to find a ball under one of the three cups than trying to guess which one of the 9 cups that had the ball. It's the same with the scales. If you know what scale the melody is in, you can forget about the rest of the notes that isn't in that scale.
Try learning a song playing by ear. If it's your first time, don't worry if it takes a long time to figure out the notes. I'm almost sure that you will be faster than i was, when i made my cover of "Clocks" by Coldplay. It took me a loooooong time! But I also wanted to have all the notes of the song right. My mistake was that I didn't have the song in my head, but needed to rely on playing it over and over and over. You should try learning a song that you can clearly hear in your head. Just focus on the melody and keep playing different notes till you find the right one. By time you should get better at judging how much brighter of deeper the tone is compared to the previous note, and the final goal is to make it instinctive like the piano chat roulette guy on YouTube
Playing by ear/improvising
How you should you use it?
As mentioned, you shouldn't only be playing the melody of a song. The rest of the song, such as the rhythm, chords and such, are needed to make the tune interesting but of course that varies from instrument to instrument. If you get stuck and you find it to difficult to make your own version of the song, try listening to other people's covers of the song or even try to make a cover where everything such as rhythm and instruments in the background of a song is taken from the song. It may or may not sound so good, but then you'll feel quite comfortable with the piece and then able to modify it. If you hear a melody, lick or something else that you like in your head, you should also try to play that on your instrument. There are several ways to use it, but playing by ear is just the tool to play whatever you hear.
Everybody that plays an instrument benefit from playing by ear if they don't want to use scores or if the scores aren't accessible.