Diminished triad = flat the 3rd and 5th of a major chord, or flat the 5th of a minor chord.
Diminished 7th chord is a little tougher. You have to know a diminished triad, already, and add a diminished 7th to it. One way to get there is to start with a major 7th chord and work through a cycle:
Cmaj7 = 1 3 5 7 = C E G B
C7 = 1 3 5 b7 = C E G Bb
Cmin7 = 1 b3 5 b7 = C Eb G Bb
Cmin7b5 = 1 b3 b5 b7 = C Eb Gb Bb
Cdim7 = 1 b3 b5 bb7 = C Eb Gb Bbb
Bbb = B double flat = diminished 7th = same note as A but called Bbb to show it’s a diminished 7th rather than a major 6th from the root of the chord.
You can do the same sort of cycle with triads if you start with augmented:
Caug = 1 3 #5 = C E G#
Cmaj = 1 3 5 = C E G
Cmin = 1 b3 5 = C Eb G
Cdim = 1 b3 b5 = C Eb Gb