This minuet (binary form) in C minor offers an excellent example of modulation:
The first modulation is to the relative major key (Eb major) at the end of section A. The ii degree of C minor is used as a pivot chord (vii degree in Eb major) (measure 6). Diminished vii degree chords also have a dominant function, so the same chord is used in place of the Eb dominant, although you could say there is a dominant chord in the last beat of the measure (Eb in the bass and Bb in treble part).
Section B starts in Eb major. A new modulation to F minor (measure 13) does not use a pivot chord. The Eb dominant in measure 12 is followed by the vii degree of F minor (measure 13).
In measures 17 to 23, a sequence takes us from F minor (the F minor chord is used as Eb major ii degree) to Eb major before returning to C minor in measure 21.