My Definition: The main character or focus of a piece of music.
Just like in any novel, just because it's the main character, doesn't always mean that it's good or that you'll like it. Melodies can be pleasant, but they can also be unpleasant. If a melody is pleasant, we call it conjunct. If it is unpleasant, we call it disjunct.
Technically speaking, conjunct melodies have notes that are generally close together and pitches that all seem to stay relatively the same. Disjunct melodies have notes that generally kind of jump around all over the place, and differing pitches. Most listeners prefer more conjunct melodies, just like most readers prefer good guys for protagonists.
A couple of examples of melody are Beethoven's "Ode to Joy" (conjunct melody) and "The Star Spangled Banner" (disjunct melody):
When it comes to visualizing melody, we can use something called melodic contour. This is basically just the way that a melody would look if it were a line or shape. Here are two examples of a conjunct and disjunct melodic contour:
Okay, so now that we have gone over all of that, there is just one last aspect of melody that I would like to go over. This is tunefulness. And, well, ya know how sometimes you hear a song and then it's just playing in your head over and over again all day and you can't seem to get rid of it? Or you'll suddenly find yourself humming a catchy commercial jingle? Well, you do these things because the melodies are tuneful. Generally tuneful melodies are conjunct and fairly repetitive in their nature. This is what makes them so memorable. As an example, perhaps the most tuneful song out there is "It's A Small World." I won't post it here though, so as not to torture you with it. But you get the idea.