Just for clarification about the term modulation:
As a musical term it means the process of moving to another key (as TONICA) (root) by means of a chord-progression that clearly establishes the functional part (TONICA) of the new key.
Sometimes it is enough to play a DOMINANT seventh chord to establish the new TONICA of a chord that lies a perfect 4th above the DOMINANT. This can be for two beats of a bar only, or sometimes even a single 'dominant-shot' on the last quarter note of a bar is sufficient.
If you want to hear this kind of modulation in the pure classical way listen to Puccini's Madam Butterfly where he even enforces this DOMINANT functionality with a sharp 5th (#5)in the dominant 7th chord and making a whole chain of modulation as a sequence:
C(maj7) - A7/#5 -> D(maj7) - B7/#5 -> E(maj7) - C# 7/#5 etc.
Of course this goes hand in hand with the instrumentation. For these tricks he always uses the harp, because - although being a diatonic instrument like a piano, and thus having 7 notes per octave - you can re-interpret/re-tune these strings with the pedals of a harp and finally get only the notes of this augmented dominant 7th chord. Which means you can really 'harp' up and down with both hands the full range and all strings sounding loudly at the same time (arpeggio -> arp == harp).
For other modulations you need something more sophisticated than a single dominant-7th-chord. A little cadence with a SUBDOMINANT-DOMINANT-TONICA pattern like IIm - V7 - I or IV - V7 - I or even a DOUBLE-DOMINANT pattern like II7 - V7 - I
e.g. Dm - G7 - C , F - G - C or D7 - G7 - C
My personal favorite for popular music is again from the 80's Barbra Streisand Albums where they use a pattern like:
IV/V - V -> that finally leads to -> I
to establish the new tonality. Either each chord for a whole bar or the whole set two times each chord half a bar. You can modulate from absolutely any key to any other key within a bar or two. Of course the bass note which already comprises the DOMINANT functionality has to be played decidedly while the chords above change between SUBDOMINANT and DOMINANT (IV and V).
Anything else cannot be considered as a modulation but rather a shift-over...
German has a very nice word 'RÜCKUNG' for this kind of unprepared change of tonality! It essentially means move/shift something to another place!