Melodies are often described as being made up of phrases. A musical phrase is actually a lot like a grammatical phrase. A phrase in a sentence (for example, "into the deep, dark forest" or "under that heavy book") is a group of words that make sense together and express a definite idea, but the phrase is not a complete sentence by itself. A melodic phrase is a group of notes that make sense together and express a definite melodic "idea", but it takes more than one phrase to make a complete melody.
How do you spot a phrase in a melody? Just as you often pause between the different sections in a sentence (for example, when you say, "wherever you go, there you are"), the melody usually pauses slightly at the end of each phrase. In vocal music, the musical phrases tend to follow the phrases and sentences of the text. For example, listen11 to the phrases in the melody of "The Riddle Song" and see how they line up with the four sentences in the song.
But even without text, the phrases in a melody can be very clear. Even without words, the notes are still grouped into melodic "ideas". Listen to the first strain of Scott Joplin's "The Easy Winners" to see if you can hear four phrases in the melody.
One way that a composer keeps a piece of music interesting is by varying how strongly the end of each phrase sounds like "the end". Usually, full-stop ends come only at the end of the main sections of the music. (See form and cadence for more on this.) By varying aspects of the melody, the rhythm, and the harmony, the composer gives the ends of the other phrases stronger or weaker "ending" feelings. Often, phrases come in definite pairs, with the first phrase feeling very unfinished until it is completed by the second phrase, as if the second phrase were answering a question asked by the first phrase. When phrases come in pairs like this, the first phrase is called the antecedent phrase, and the second is called the consequent phrase. Listen to antecedent and consequent phrases in the tune "Auld Lang Syne".
Of course, melodies don't always divide into clear, separated phrases. Often the phrases in a melody will run into each other, cut each other short, or overlap. This is one of the things that keeps a melody interesting.