What are secondary diminished chords?
In music theory, a secondary leading-tone chord or secondary diminished seventh (as in seventh scale degree or leading-tone, not necessarily seventh chord) is a secondary chord that is the leading-tone triad or seventh chord of the tonicized chord, rather than its dominant.
Where do you use a secondary dominant chord?
Secondary dominants are often used to anticipate the natural dominant of the song. For example, in the previous case, the natural dominant of the song was G7, so we could play another dominant before it to prepare going into G. Observe: G's dominant is D7.