Simply put, a melody is a sequence of notes played in a particular order. Melodies can be the same, single note played multiple times, or a combination of multiple notes. Whether the melodies are complex or simple, they are meant to be memorable.
All musical compositions include melodies, but melodies are not always the focal point. In fact, many times, each instrument plays melodies throughout the composition. A good melody, whether vocal or instrumental, makes use of repetition.