The processing of developing your musical ear is essential to becoming a well rounded piano player.
The important thing is to start early, with basic exercises. Every song and technique you learn should be paired with an aural understanding.
For example, if you are working on the major scale and major triads, it is important to practice "hearing" these musical devices. The best way to do this is to sing them, externally first and then internally.
Singing "internally" is also known as "audiating."
As piano players, we want to be able to "sing" through our fingers.
To do this we need to learn the musical vocabulary and audiate it in our head before we even press down the keys. Over time, this 2 step process becomes 1 automatic step.
The most important ear training "building block" of music is to learn the intervals. Starting by singing the notes of a major scale. 1, 2, 3, 4, 5, 6, 7, 8. Practice ascending and descending.
Next, try to sing from the root (1) up to each interval and take note of the sound. 1-2, 1-3, 1-4, 1-5, 1-6, 1-7, 1-8. Also practice this descending from the top down.
A common practice tool here is to make interval associations with popular songs. For example, Happy birthday starts with an ascending major 2nd interval. Here Comes the Bride starts with an ascending perfect 4th.
The associations are like training wheels. Initially they are useful, and later on you will know your intervals without needing the reference songs.
You can practice intervals with this free app here: Interval Ear Training
Try to sing a major scale and modify the 3rd, 6th, and 7th to make it a minor scale. Every new piece of musical vocabulary you learn should be internalized through singing and audiating.
Next you can try the chromatic scale. This scale can be more challenging with the sequence of 12 half steps, but it will really develop your ear.
You can practice scales and modes with this free app here: Scale Ear Training
After mastering intervals and scales, the next step is to work on triads, or 3-note chords. Start with the major triad (1-3-5) and then try to modify it to a minor, diminished, and augmented triad.
Then you can start to practice inversions, which are excellent for mastering 3rd and 4th intervals. You can also try out patterns such as 1-5, 3-8, 5-10.
Then practice common chord progressions, such as those involving primary chords (1, 4, and 5). The key here is to focus your ears on the bass, since the bass or "root" determines the chord. If you can follow the bass, you can figure out the chords.
As your understanding of theory grows, you can practice 7th chords including the major 7th, dominant 7th, minor 7th, half diminished and fully diminished 7th chords.
An important point about training your ear with chords is that the human voice can only sing 1 note at a time. We therefore need to "arpeggiate" the chord tones with our voice or inner ear. It takes time to develop the ear sufficiently to be able to hear chords internally without first arpeggiating them, but it can certainly be done.
You can practice scales with this free app here: Chord Ear Training
The key is to integrate ear training into every practice session. Most students are not deliberate enough about this, and they risk becoming "button pushers." You will never feel completely free to express yourself as a musician, especially as an improvisor, if you do not start to work on ear training (especially audiating). You need to be able to aurally anticipate what you play, and this happens through your inner ear.
First, it will be a 2 step process. You will sing something, and try to play it back. Over time the errors will lessen, and what you hear internally will instantly come out through your fingers. This is great to practice along with transposing. Try not to start in the same key each time. Explore the possibilities of all keys!
Make every interval, scale, chord, melody, and piece of music you practice feel as though you are "singing through your fingers."