The process of changing from one key to another in a piece of music is called modulation . The most common modulations are modulations to closely related keys.
There are several methods that we can use to find closely related keys.
In case of a major key, find the subdominant and dominant chords, their relative minor keys and the relative minor key of the main key:
In case of a minor key, find the subdominant and dominant chords, their relative major keys and the relative major key of the main key:
Finding the II to VI degree of a major key:
Finding the III to VII degree of a minor key:
Closely related keys are neighbors in the circle of fifths: