To hear a melody and be able to play it yourself is a skill you can train. A great way to train is by daily repetition and building it up slowly. It will take time.
People recognise an interval in four ways: as a distance (three frets up), as a quality (the sound of a third), as a place in a key (the third up to the fifth), or as the start of a song they know. Beginners start from the distance; trained listeners mostly hear the place in the key. The Ear Trainer trains the first two and, at its last level, asks for the distance inside a melody, where the third way begins.
The lessons are small sessions of guided listening and practice rounds followed by a test. Over time you can follow the progress of the tests.
Handed to you by Notes · Intervals: the distances between notes.