Harmony is most often used to refer to the dimension of music pertaining to the succession of chords. The terms harmony and chord are so closely related that they are sometimes conflated: a musician might refer to a C major chord as a “C major harmony.” However, whereas the term chord refers to a musical object (either in the abstract or in a particular musical manifestation), harmony denotes a more general parameter (on par with the equally general terms “melody,” “meter” and “form”). Nevertheless, the description of harmony in a given piece of music is founded upon of the construction and succession of its chords, and the relationship of those chords to each other and to the piece’s key. Harmony is the principle according to which chords are ordered.
Harmony and melody are the two musical parameters that deal with the domain of pitch. They are often understood through a “vertical” vs. “horizontal” heuristic: melody, which is fundamentally linear, with a single note being played or sung at a time, is the “horizontal” domain; harmony, which involves notes being played at the same time, is the “vertical” domain. The distinction between melody and harmony can sometimes affect the way in which instruments are grouped: instruments that are usually only capable of playing one note at a time (e.g., voice, trumpet, saxophone) are primarily “melodic” in function; instruments that are capable of playing chords (e.g., piano, guitar, synthesizer) can be thought of as “chordal” instruments, though they are of course capable of playing single melodic lines as well.
Although harmony is understood as belonging to the “vertical” dimension of music, harmony can be expressed through melodic means, and indeed, melodies usually imply an underlying harmony or succession of harmonies. In other words, even if we hear the melody alone our ears will infer an appropriate harmonic accompaniment because we are habituated to hear certain chords accompanying certain linear pitch progressions. The simplest instance of this “horizontalization” of harmony is the arpeggio, where the individual notes of a chord are played in succession, rather than simultaneously.