Andrew Wasson of Creative Guitar Studio explains the use of Modulation in a piece of Music. He explains the two most popular types of modulating from one key to another in a song. Direct Modulation, which occurs when a key appears suddenly. And, Pivot Chord Modulation, which will use a chord shared by both keys to allow for a seamless transition between the old to the new.
Follow the link below to buy a copy of Andrew's eBook,
"Using the Major Scale Modes"