Just like each scale degree, each modulation sounds different, and you’ll want to focus on each one separately. Start with the most common modulations: to the relative minor and the fourth and fifth scale degrees, the add others as you come across them.
There are two exercises I recommend to start:
1. Learn to identify secondary dominants
A modulation can be prepared in a number of different ways by incorporating chords from the new key into the chord progression. The pivotal moment however is often a secondary dominant: the dominant (V) chord of the new key.
Make sure you spend some time learning to identify the secondary dominants for all of the modulations you wish to recognise. An internalisation exercise for these would be an excellent idea, and it’s something that I hope to make at some point in the future!
2. Applied ear training
The other way to learn to recognise modulations is to simply work each one out, whenever you come across one that you cannot recognise easily.
Learn to sing the root notes of the chords throughout the modulation, learn to sing the melody and learn to sing some lines that voice lead through the chord tones.
As you learn to sing each of these parts, make sure you know the scale degree of each note in the original key, and listen for when you hear it switching to the new key.
This simple exercise will help you to develop confidence with that particular modulation. As you do it with a few, you’ll start to draw connections between them and soon you will have covered most, and then all the modulations you come across.
So good luck with it!
I apologise that this lesson is brief. My focus is still on the earlier stages of ear training, as it’s in those earlier stages that most musicians are stuck. If you have any questions, please get in touch: firstname.lastname@example.org.