Melody is the part of songs that most people identify with. Since there are so many harmonic and rhythmic combinations, melody is the most distinct part of any song. Close your eyes and think for a moment of your favorite piece of music. And chances are you're hearing the melody in your head. A melody is both rhythmic and harmonic. And if it is well constructed, it can be sung or played on its own and be clearly understood.
Simply put, a melody is a string of notes and rests that move up and down in relation to the harmony underneath it.