Modulation, in music, is the phenomenon of changing the tonality of the music—that is, changing what key it's in.
In Western classical music tradition (on which much of today's popular music worldwide is based), modulations are usually between keys that are close to each other—that is, they differ by at most one or two sharps or flats, if at all. These feel natural because the two keys have a lot of pitches in common with each other. One prominent exception to this is going between the major and minor keys of the same home note (e.g. C major and C minor) - but that's not really a modulation anyway, just a mode shift.
Going into the 19th century, musicians started to experiment with more stuff (culminating in the 20th century where songs sometimes didn't have a key at all). The resulting repertoire of common modulations grew quickly. This was also where the Truck Driver's Gear Change, the business of modulating up by a mere half-step, began to gain ground. These were unlike prior modulations because they didn't add a sharp to the key signature, they added a sharp to every note being played. Typically, this means shifting from a sharp key to a flat key or vice versa, which would have given some classical composers apoplexies (indeed, if you were to plot this type of modulation on the Circle of Fifths, you would be jumping to a position almost directly opposite the starting key), but it works because the keys are so similar.
Usually, you can tell a modulation if the "flavor" of the music (and usually, though not necessarily, the emotion) changes. This doesn't happen too often in modern popular songs, partly because they're rather short and partly because it's hard to do them smoothly, but can sometimes be found between verses and refrains, with verses in one key and refrains in another. Examples of this technique include The Beatles' "Good Day Sunshine", Boy Band Midnight Sons' "If Only Tears Could Bring You Back", and—most notably for tropers—Jonathan Coulton's "Still Alive" and "Want You Gone." (These two get extra credit for switching between sharp keys and flat keys: D to F in the first, B♭ to G in the second.)
Modulations are very common in classical music, being a staple of tonal music (i.e. dating from the late 1500s forward, as opposed to modal music, which cannot change keys by virtue of not having a key in the first place). They occur both in miniature (lasting only a couple bars, or even a couple beats) and larger-scale (for entire sections of a work) forms.
Modulation tropes include: