licks are short phrases..that are sometime signature stuff from a particular artiste or a standard genere lick..which u can identify with immideatly. riffs are more "song driving" basically they are like short lead passages..but the main diff is that riffs are what the songs based upon.
pretty much what dharmatma said. furthermore riffs are small repeated melodies that drive the song, licks are not repeated they are just very small succession of notes that are phrases.
one further addition (this is my personal feeling) riffs are more particular to the band's music style licks are the charchteristic quirks displayed by the guitarists whiile playing notes (or even intervals) frankly a riff can be a lick or a lick can be a riff ... its how u use it. suppose u take the "Smoke on the Water" opening - that is a riff however in the leads, Ritchie Blackmore plays his charachteristic licks
I know one song off the top of my head that is a fantastic example of differences between riffs and licks because it has both in it. Listen to Dire Straits - Sultans of Swings. The bit where he plays the chord riff in the chorus (middle tri chords of Dm-C-B-C-Dm-C-Dm-C) is a riff, but when the little twangs he plays here and there in between his words are basically licks. And if you know enough licks you build them up together to give you an entire solo, or in other words a series of musical licks that sound nice together.
Actually I have seen even big artists use Licks and Riffs interchangeably. I used to think that the Riffs are more Rhythm Based and Licks are more Lead oriented. Again can be interchangeably used.
yeah thats a riff, another chord riff which is heard being played throughout different parts of the song.