It serves as the main musical idea for a section of a song. Often it's repeated and developed, sometimes with variations, sometimes in different keys, but always recognizable as the same main musical idea.
Because a riff is a main theme for a song, it often becomes inextricably associated with that songif you heard the riff out of context say, someone trying out Guitar lick riffs in Guitar Centeryou'd associate it with the song. If the song is a hit, the riff becomes quotable, and anyone else who plays the riff is making an allusion to the original song. A lick is musical idea, too, but often it's incomplete. It might be a fragment of a solo or a portion of a riff.
By itself, it doesn't usually become thematicin fact, a lick that forms a theme essentially becomes a riff.
A lick combines Guitar lick riffs other licks to form a complete musical idea. Because a lick isn't the main theme, it doesn't have that same association with the song, and so it's transferable: FWIW, I disagree with the idea that licks are necessarily single-note phrases.
It's chordal, but still very much a delicious lick. My point is that the difference between a riff and a lick has more to do with the roles they each play in the song than whether or not they involve chords.
I doubt that this is an accepted difference, but I usually envision a riff as an integral part of a song, often repeated multiple times throughout the song. Could be individual notes mixed in with chords, or just individual notes, but it's an important part of the song, and you'd have to learn it to make the song Guitar lick riffs correct.
A lick again, in my definition is, as Guitar lick riffs Mayhem said, something used in solos, used by experienced improvisers to give their solos structure, and by inexperienced improvisers to avoid having to make TOO many on-the-fly decisions. The bit differentiation in my mind is that a lick can be changed or removed from the overall work, and the work is still fundamentally the same.
If you remove a riff from a song, it doesn't sound the same, and even a layperson may notice. Licks are usually associated with single-note melodic lines rather than chord progressions. I think that 'It smells like teen spirit' has caused a lot of confusion here.
Leaving aside 'lick,' the opening chords of the Nirvana song are not a riff. It is simply the chordal base to the song even if it Guitar lick riffs instantly recognisable. If you want riffs try Wishbone Ash. The idea that anything of the noodling Johnny Marr does is a riff contradicts the Smiths' whole aesthetic. Most classic riffs are very simple short Dead Meadow for longer ones pentatonic minor memorable Guitar lick riffs over one chord like Voodoo Chile usually doubled by the bass.
Everything else is just guitar playing. I would diffrentiate by calling a riff a musical idea usually in the lower register serving as a main part of the tune, usually single notes but not exclusively think about Mr.
But definitely not all chords. A lick is something more likely to be in the upper register as an augmentation to the main tune.
Think of those high notes in the intro and verse part of back in black. The main diffrentiation though is whether its the main tune or not.