Chords & Harmony
Harmony
Harmony is the sound of different pitches heard at the same time, and the way those combinations (chords) follow one another under or around a melody to create tension and release.
Harmony is what you hear when different notes sound together, and how those sounds change over time. If melody is the horizontal line you can sing, harmony is the vertical layer underneath it: the chords that support the tune and give it its color.

Melody and harmony
Sing the melody above on its own and it already makes sense. Add the chords and every note gains a context. The G7 in bar 3 makes the F at the end of that bar lean toward the E that follows, and the return to C in bar 4 sounds like arriving home. Harmony turns a line of notes into a series of moments that feel stable or unstable.
The same melody note can sit in different chords, and each choice changes the mood. An E can be the third of C major, the fifth of A minor or the root of E minor:

How harmony moves
Chords rarely stand still. A chord progression moves between a stable home chord (the tonic), chords that lead away from it, and chords that pull back toward it, above all the dominant. Theorists call these roles harmonic function. The resting points at the ends of phrases are cadences, and the speed at which the chords change is the harmonic rhythm.
Consonance and dissonance
Some combinations sound settled, others tense. Consonant intervals such as thirds, sixths and perfect fifths blend; dissonant ones such as seconds, sevenths and the tritone create friction that the music usually resolves. Much of the drama in tonal music comes from building up dissonance and then releasing it.
Studying harmony
In a theory course, "harmony" is also the name of the subject: building chords, naming them with Roman numerals, and writing four-part harmony with smooth voice leading. A good place to start is The primary chords: I, IV & V, followed by Choosing chords for a melody.
Common questions
What is the difference between melody and harmony?
Melody is a single line of notes heard one after another. Harmony is notes heard at the same time, usually as chords that accompany the melody.
Can a single-line instrument play harmony?
Not by itself in the usual sense, since a flute or trumpet plays one note at a time. It can still imply harmony by outlining chord tones one after another, as in an arpeggio, and it creates harmony when it plays alongside other instruments.
Practice it: free worksheets
Choosing chords for a melodyTo harmonize a melody, you choose the chords to play under it. Three questions do the work: which chords own the important notes, how often to change, and where each phrase ends.
Harmonize a melodyChoose a chord for every bar. Look at the melody notes on the strong beats — beats 1 and 3 — and pick the chord that contains them. Write I, IV or V7 in the box above each bar. (Chords: Handouts 22 and 42; symbols: Handout 229; how to choose: Handout 358.) Next: Exercise 57 adds ii and vi.
The primary chords: I, IV & VTwo chords took you far — a third finishes the toolkit. The chords built on degrees 1, 4 and 5 are the primary chords, and together they can harmonize almost anything.
The chords of a keyBuild a triad on every note of a major scale and you get the seven chords of the key. Three are major, three are minor and one is diminished, always in the same order.
Four-part harmonyA hymn is written for four singers: soprano, alto, tenor and bass (S A T B). Each sings one line, and on every beat the four notes make a chord.