Riffs are often derived from the minor pentatonic scale. A riff is a repeating pattern of notes which often locks in with the bass and drums to set up the feel of a song, or a section of it. Riffs are common in lead guitar playing. Here is an example.