Melody is an orderly chain of pitches organized by rhythm. Rhythm, or how long each pitch lasts, is an important part of the melody. Even when the pitches remain the same, if the rhythm is changed, it becomes a unique melody.
The melody is the tune of the music. It is what we can sing, whistle, or hum, and is the easiest part of the music to remember. Melody is horizontal, meaning the notes sound one after another, while harmony is vertical, meaning the notes sound at the same time.