There’s a lot written about the diminished chord and its uses but a lot of it is bullshit in my opinion. So let’s set the record straight.
This is a C diminished chord:
It contains a C (root), Eb, Gb and A. This is a chord that is based on stacked minor third intervals. It sounds weird on it’s own but that’s because it is a passing chord. It adds harmonic tension going from one chord into the next. For example when playing B7 to C#minor7 you might play a C dim in between those.
There’s a lot written about its uses but a lot of it is bullshit in my opinion. It’s actually very easy to understand but all info I ever found was completely missing the point of this passing chord. Even Wikipedia (see this Wiki-page) makes it way too complicated and misses the point of the function of this chord.
The passing note
Look at the notes of that C dim and compare it to those of a B7. You’ll notice that those notes are the same except for the root note. Voila! The diminished chord is nothing but a dominant 7 chord with it’s root note a half step higher!
So if you play B7, Cdim, C#minor7, you are actually playing B7, B7/C, C#minor7. The only thing that is moving is the root, a movement in the bass.
If you are soloing over these progressions you might play a diminished lick (minor third stacked) over the dim chord but keep in mind that what you’re playing in your solo is the movement of the bass line which can create a dull moment because there’s no contrapunct. You’re playing unisono with the bass. It can be okay for sure, but just be aware of it. When soloing over C dim you can simply use B7 chord tones, even playing the root note B.
And when we play Bmaj7, Cdim, C#minor7 for example we can approach it exactly the same way. The Cdim is a B7 with a C on the bass. So in fact you go from Bmaj7 into B7 and then into C#minor7 which is a very often used movement. And a nice one because of the nifty harmonic changes.
So there you go: a diminished chord is nothing more than a dominant 7 chord with its root note in the bass moved up a half step.