The horizontal organization of notes is called a melody. However, when the notes are happening simultaneously, whether with a guitar, piano, or choir, it’s called a chord. Three or more notes played simultaneously are called a chord.
Chords can be played in a block, like a piano chord or a guitar chord. But they can also be broken into alternating notes or rhythmic patterns which “connect” in the ear of the mind to create a chord.
When a series of chords are played, either in block or rhythmic patterns, and then changed to a different block or pattern to provide a musical underscore to a melody, it’s called harmony.
Depending on the type of music, these patterns will be presented with a style uniquely characteristic of the type of music being played and with a unique choice of instruments.
In a rock band, the rhythm guitar or synthesizer provides the harmony to the lead singer’s melody.
In a country group, it might be the guitar, steel guitar, or piano which give the harmonic basis for the melody on top.
In a jazz ensemble, it might be 3 or 4 brass or saxophone instruments, each playing a different note of the chord and creating the harmony by playing simultaneously. A choir or backup singers can each take one of the three (or more) notes in the chord and then shift from beat to beat or measure to measure to create the flowing harmony.
The musical connection between melody and harmony is this: most often the melody note is chosen from one of the notes in the chord at the moment. On occasion, the melody may be passing through another note to get to a note in the chord being played in the harmony. But, they both need to be connected, plugged in, to the same harmonic framework.
While the harmony is less noticeable than the melody, the melody without the harmony would be much less interesting and powerful.