Root, third and fifth
A triad starts on a note called the root. On top of it sits a 3rd, and on top of that another 3rd, which lands a 5th above the root. C, E and G make a C major triad: C is the root, E the third, G the fifth.
Four kinds of triad
Which 3rds you stack decides the kind. Major: a major 3rd, then a minor 3rd (4 + 3 half steps). Minor: a minor 3rd, then a major 3rd (3 + 4). Diminished: two minor 3rds (3 + 3). Augmented: two major 3rds (4 + 4).
Most listeners hear major as bright and minor as darker or sadder. Diminished sounds tense, and augmented sounds unsettled, as if floating. The difference between C major and C minor is a single note, E or E flat.
Triads in a major key
Build a triad on every step of the C major scale using only white keys and you get a pattern found in every major key: the chords on steps 1, 4 and 5 are major, those on 2, 3 and 6 are minor, and the chord on step 7 is diminished. Many folk songs and hymns get by with only the chords on 1, 4 and 5.
Inversions
The same three notes can be stacked in a different order. With the root at the bottom the chord is in root position; with the third at the bottom it is in first inversion; with the fifth at the bottom, second inversion. The chord keeps its name and its mood, but its color shifts.
Seventh chords
Add one more 3rd on top of a triad and you get a seventh chord, four notes spanning a 7th. The dominant seventh (a major triad plus a minor 7th, like G B D F) pulls strongly toward home, which is why it so often comes just before the end of a phrase or a piece. The major seventh sounds soft and jazzy; the minor seventh sounds mellow.