dim7 (diminished 7th) chords are constructed with the 1st, b3rd, b5th, and bb7th notes of the major scale. bb7 (double flatted seventh) is enharmonically equivalent to the the 6th note of the major scale.
min7b5 (half-diminished 7th) chords are constructed with the 1st, b3rd, b5th, and b7th notes of the major scale.
This Ddim7 chord shape is constructed of 1 (R for root), b3, b5, and bb7.
The half-diminished chord is often used as a two chord in a minor two-five-one progression. Here's a very common example of this sequence, in the key of F minor.
Here's that same sequence, in the key of C minor. This uses the open Dmin7b5 shape from above.
The fully diminished seventh chord is often used for its strong tendency to resolve, due to the dissonance created by the diminished seventh interval. Here's a common sequence to hear this tension and resolution.