A great way to practice playing by ear is to listen and repeat after these three note phrases on your instrument.
Here's a different version, this time with a female
voice singing solfeggio.
Here's another ear training tool
that plays five random notes based on common chord structures.
To find out more, check out http://www.patternpiano.com/