In order to understand how a diminished chord is formed a student needs to know the difference between a Major and minor third.
A Major third has two consecutive whole steps from a starting note so for example, C to E creates a Major third. If a student sings C to D to E, he will have started the song “Do a Deer” from the “Sound of Music.” If the E is lowered to Eb, and the student now sings C to D to Eb, he will sing what sounds like Do a sad deer. C to D to Eb creates a minor third between C and Eb. Minor is more somber than Major.
To be more analytical about the difference between a Major and minor third:
A Major third has two consecutive whole steps, measured from the starting note.
A minor third has a Whole step followed by a half step, measured from the starting note.
A Diminished chord has two consecutive minor thirds
If you are in the Key of C Major and you play a chord on each scale degree, when you arrive on the seventh note “B” of the scale, and build two skips on top of B, you will have a naturally occurring diminished chord: B D F. From B to D is a minor third, and from D to F is another minor third.
More often than not, diminished chords appear with still another minor third added on, which makes a diminished 7th chord:
B D F Ab (Ab is the 7th)
In the embedded video I demonstrate this particular diminished 7th chord played in open position (no thumb shifts) as a warm-up before playing an extended diminished 7th arpeggio (broken chord) across the keyboard.
For Open position practice:
B D F Ab
1 2 3 5 (Right Hand)
5 3 2 1 (Left Hand)
Practice in Parallel motion:
Quarter notes to 8th notes, to two sets of triplet 8ths, to four times triplet 16ths–one set legato, followed by a set staccato, and still another set played soft staccato.
The same is practiced in contrary motion.
For resolutions of the diminished chord.. Resolve B D F Ab to C E G (Major triad)
Then resolve B D F Ab to C Eb G (parallel minor triad)
Continue by playing across the keyboard in parallel motion. Always begin by practicing separate hands.
Fingering
B D F Ab B D F Ab B etc.
RH 1, 2 3 4 1 2 3 4 1 etc
LH 5 4 3 2 1 4 3 2 1 etc
Except for the very beginning and end of the diminished 7th arpeggio, the thumbs meet on B.
Rhythms:
quarters, three octaves
8ths, three octaves
16ths four octaves
32nds four octaves
32nds four octaves (staccato)
You can vary dynamic levels. Play mezzo forte for quarters and 8ths, Mezzo piano for 16ths and 32nds. etc.
More Technique related videos:
https://arioso7.wordpress.com/2010/12/31/piano-technique-related-videos/

I always had trouble with 7th’s. I could never remember to play a whole tone or semi tone lower than the root of the chord. Practice make perfect though!
Yes, the challenge is what makes life interesting. Enjoy your piano!