Music in general has three elements:
No matter the style or genre, the music itself will contain one, if not all three of these elements. I listed them in order of their importance too, in my opinion rhythm is the most important, if we do not have rhythm then we do not have anything so to speak. Rhythm is also one of the most commonly misspelled words in the English language:)
Harmony refers to chords. A chord is two(diad) or more notes played together. Chord possibilities can be infinite, however with instruments such as guitar, we are limited to six strings(notes) that can be played simultaneously. Other instruments such as piano are able to play many more notes simultaneously.
Melody is in reference to scales. We get our melodies(riffs/licks) from scales, Scales are a group of notes that are played in a sequence or order. There are all kinds of different scales.
This is just a simple generalization of music