A diminished seventh chord is composed of four notes where: 1) there are three semitones between the first and the second note; 2) there are three semitones between the second and the third note; and 3) there are three semitones between the third and the fourth note.
The A diminished seventh chord for example is composed of A, C, Eb, and Gb. There are three semitones between A and C, C and Eb, and Eb and Gb.
The diminished seventh chord can be obtained from the standard minor seventh chord by replacing the perfect fifth and the minor seventh with a diminished fifth and a diminished seventh respectively. The minor seventh chord Amin7 is A, C, E, G. Changing the perfect fifth to a diminished fifth (E to Eb) and the minor seventh to a diminished seventh (G to Gb) produces the diminished seventh chord. (If we were to take a minor seventh chord and only lower the fifth, but not the seventh, we will obtain a half-diminished seventh chord – e.g., Am7b5 = A, C, Eb, G).
Since the first three notes of the diminished seventh chord form the diminished triad (e.g., Adim = A, C, Eb), one can also obtain the diminished seventh chord by adding a diminished seventh to the diminished triad.
The diminished seventh chord is denoted by "*7". For example, A*7 = A, C, Eb, Gb.
The diminished seventh chord does not occur naturally in many scales. It is predominant in the harmonic minor scale, where it can be built on the second, fourth, sixth, and seventh notes on the scale (on the supertonic, subdominant, submediant, and the subtonic), although other seventh chords can be built in the same scales starting on some of these notes as well. The A*7 chord exists for example in the harmonic minor scales in A#, C#, E, and G. In the G harmonic minor scale, for example, a more appropriate seventh chord would be the half-diminished Am7b5.