Learn music by ear.
The Phrase "Play be Ear" means to simply play a song without the assistance of a lead sheet, chord chart, or sheet music. Said song is learned by listening to it. In my opinion, learning a song exclusively by ear is more difficult than learning to read music. If you are an absolute beginner, I suggest you check out the How to read sheet music section.
Reading sheet music allows the student to see and hear the music. Playing by ear is like adding up a bunch of numbers without the assistance of a calculator. However, it is really simple to do once you have done it a trillion times because overall, music is very repetitive from a analytical perspective. In addition, its a great skill to have and its really cool to learn a new song while driving your car and listening to the radio.
It is vital that you know the name of the notes on the keyboard. Also, it is very important the that you know all your major scales. Every song you encounter will be based on one of the major scales. Remember, a major scale is made up of Seven notes. Lets take a look at the beginning of a simple song "twinkle twinkle little star" and compare it to the notes of the C major scale. (C D E F G A B)
Twinkle Twinkle Little star, How I wonder what you are...
C C G G A A G F F E E D D C
As you can see, the Cmajor scale's notes are used to form this simple song. This rule generally applies to most songs. (Please note,there are songs that will use notes outside of the major scale.) Let's look at another sImple song, "Mary had a Little lamb."
Mary Had a Little lamb, little lamb, Little Lamb...
E D C D E E E D D D E G G
Again, here is another example how the notes that make up the C major scale are decomposed and rearranged to form a song. In conclusion, knowing all 12major scales is essential to playing by ear.