Harmony is the part of the song that fills out the musical ideas expressed in the melody. Often, when you use music theory to build a harmony based on a melodic line, you’re essentially filling in the missing notes of the chord progressions used in the song. For example, take a look at this simple melody line.
You can fill out the harmony above by simply grabbing the notes of the I and V chords and placing them in the bass line.
To put it really simply, harmony is all about the building of chords, which are tones coming from the scale in which the music is composed. Harmony also stems from the order of the chord progressions themselves, and also how a phrase resolves itself through the V‐I or IV‐I cadence.
Consonant harmonies are those that sound stable and pleasing to the ear, such as the I chord at the end of a phrase. Dissonant harmonies sound unstable and unpleasant to the ear; they may sound wrong or seem to clash until they’re resolved into consonant harmonies.
Tension can be created in a song through harmony by creating dissonance, often by adding extra third intervals on top of a triad to build sevenths, ninths, and so on. Many seventh chords are dissonant harmonies. Composers also use the tension between consonance and dissonance to establish a sense of a beginning and ending in a song.