1. Determining the melody - Melodies determine what chords will be played. If you can use your ear to figure out what notes are being played in the melody, you are 1/4 on your way to learning a song! More resources on learning how to determine melodies
2.Harmonizing the melody - Once you have figured out the melody (using some of my techniques on the resource page), it is time to harmonize it. This is simply choosing various chords to accompany the melody. There are several techniques and tricks to doing this. More resources on learning how to harmonize melodies
3. Altering Chords - This is the best part! Now that you have strategically figured out the melody to a song and have harmonized it, altering your chords to produce certain sounds is the next step. If you were playing gospel music, you would alter your chords differently than if you were playing classical or country music. More resources on altering chords
4. Listening - After you have determined the melody, harmonized the melody, and altered some of your chords, there are various techniques you can use to make sure that your song sounds right. More resources on listening techniques
I personally recommend "The Secrets to Playing Piano By Ear" 300-pg Course and through my relationship with Jermaine (the author of this course), I've been able to get him to throw in a few bonus items (3 additional piano software programs). He has taught literally thousands of musicians how to play the piano by ear. If you understood just half of what he discussed above, you'll definitely benefit from his 300-pg course. Click here to learn the secrets to playing absolutely any song on the piano in virtually minutes! I highly recommend it.