Modulation can be defined as the changing of key within a song (or chord progression). It is very important to recognize a modulation.
In sheet music, a modulation is sometimes indicated by changing the key signature. This will usually be done if the modulation occurs between one section of the song and the next (e.g., between one verse and another). Where there is no change of key signature, a modulation may be detected by examining the melody and/or the chords.
When examining the melody, remember that each key is recognizable by the notes of its scale. If different notes appear it may indicate a modulation. For example, if a melody in the key of C suddenly features F# notes, it could suggest a modulation to the key of G. When examining the chords, a modulation may the determined by following the chord/key relationship, i.e., looking for chords that "fit into" a certain key. Consider the following progression -
which can be analyzed as such:
The use of Roman numerals makes the layout of this progression very clear, and it is based on the IIm7-V7 chords, modulating through four different keys. This type of modulation is most common in Jazz songs. You will find that many Rock songs, although featuring modulation, will not do so to such a great extent.
One of the most common modulations in songs is from the major key to its relative minor:
Another common form of modulation is to change up to the key one semitone or one tone higher. This can be done successively, as in the following example: