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 catch 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.
Listen: Phrases in "The Riddle Song"
Listen to the phrases in the melody of "The Riddle Song" and hear how they line up with the four sentences in the song.
The Riddle Song: This melody has four phrases, one for each sentence of the text.
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: Phrases in "The Easy Winners"
Listen to the first strain of Scott Joplin's "The Easy Winners" to see if you can hear four phrases in the melody. The first 40 seconds or so of the video contain the four phrases.
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. 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.
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.
A period is a structure of two consecutive phrases, often built of similar or parallel melodic material, in which the first phrase gives the impression of asking a question which is answered by the second phrase. In Western art music or Classical music, a period is a group of phrases consisting usually of at least one antecedent (question) phrase and one consequent (answer) phrase totaling about 8 measures in length (though this varies depending on meter and tempo).