Learn to play by ear with these 6 steps:
• Practice playing the scales on the piano until you are very familiar with each note, where it is on the keyboard and the sound that it makes. Pay attention to the steps between one note, say a C, and a higher note like a G. Think of the sounds of two notes. Now, try to find those notes on the keyboard without stumbling around.

• Think of a simple song, such as “Mary Had a Little Lamb.” As you review the melody in your mind, pay attention to the notes. Do they go up or down on the scale? Sit down and play the melody. This exercise will train your mind to hear the intervals between the individual notes. Continue this exercise with other simple songs until this practice becomes second nature.
• Find the harmonizing chords that go with the melody. For example, the primary chords for the C scale are the C chord (CEG), the F chord (FAC) and the G chord (GBD).
• Notice the rhythmic patterns in a song. For example, in “Mary had a Little Lamb,” the first measures have a rhythm of slow-fast, slow-fast, fast-fast-fast. Before you attempt to play a piece by ear, review it in your mind, paying attention to the patterns of the song.
• Put it all together. Once you’ve mastered the harmony, melody and rhythm of a song, play the entire piece through. Make a list of songs you’d like to learn to play by ear and practice each one.
• The final step in learning to play by ear is mastering the ability to improvise. Once you have a solid knowledge of chords and intervals, you can change a piece by changing the rhythm or the chord sequence.