In its simplest form, harmony occurs whenever two or more pitches are played at the same time. It also refers to the 'backing' chords which often accompany the melody in songs. Much of ear training and music theory practice is devoted to a study of harmony. By understanding the principles related to harmonic intervals, chords and chord progressions, you will find it much easier to recognize the chords in the music you hear. You will also have an easier time choosing chords to match your original melodies.