Major chords (unlike minor or diminished chords) consist of three notes called a triad.
C major chord: C E G
The chord is determined by its note intervals in the major scale, which are 1, 3, and 5. The pitch intervals between the notes are two whole steps and one and one half steps. For example, C and E have a pitch interval of two whole steps between them. The pitch interval between E and G is one and one half steps.
Major chords
C E G
C# E# G#
Cb Eb Gb
D F# A
Db F Ab
E G# B
Eb G Bb
F A C
F# A# C#
G B D
Gb Bb Db
A C# E
Ab C Eb
B D# F#
Bb D F
Notice there are 15 chords above, but three of these share the same pitch. C# is the same pitch as Db, Cb the same as B, and Gb the same as F#.
Also, notice that you can arrange the chords by their pitch interval between notes. For example, arrange the tonics to progress to the next higher pitch in fourths. When this is done, the notes also progress to the next lower pitch in fifths.
G B D
D F# A
A C# E
E G# B
B D# F# (Cb Eb Gb)
F# A# C#
Gb Bb Db
Db F Ab (C# E# G#)
Ab C Eb
Eb G Bb
Bb D F
F A C
C E G
F# A# C# and Gb Bb Db are different notes but the same pitch. This is true of Db F Ab (C# E# G#) and B D# F# (Cb Eb Gb). This overlap can be seen better when the chords are arranged in a circle (the circle of fourths and fifths).
The reason the ‘last’ note in each chord ends with the same ‘first’ note of the next chord is because they are five notes apart or fifths. The can be seen better by looking at your major scales.
Playing progressively through the tonics on the circle of fourths and fifths is a good way to learn the fourth and fifth note in each scale.