To me melody is the soul of music. It is the essence of your being.
Not to sound too exotic, melody is that single voice that truly exemplifies your inner feelings. It is that one horizontal line of sound produced by any instrument which can only play one sound at a time but moving in different directions one note after the other. Examples of instruments that only play one note at a time are: the human voice; wind instruments; horns. Any others? A guitar, a piano; are 2 dimensional instruments (actually 3 if you use them as percussive instruments) that can play either one note melodies but are also capable of playing many notes at the same time too (aka harmony/chords, to be discussed later).
I have never heard a musician be able to play more than one note at a time on a single bassoon, oboe, flute or trumpet and similar instruments like these. Those instruments play many notes but all in succession, not simultaneously.
Who has not started to hum a tune in the shower or the car, without any accompaniment? Just your voice. And your inner sense of what sounds good or not. That tune; Your Voice; That is melody.
When a melody is played by any instrument, it becomes an extension of the human voice. Whatever the human voice can sing, compose, improvise, can be played on any melodic instrument. It is conceived in the composer’s or musician’s mind and then executed on the instrument. The more adept the musician or composer is at his instrument, the closer he will get to the very essence of the melody he is trying to sing, however complicated or simple it is. Bach; Mozart; The Beatles; John Coltrane. All of these composers created melodies from their melodic voice within, but that were transferred, as an extension, to the melodic instruments that played them.