A riff is just another name for a repeated musical idea. Also known as an ostinato, the word "riff" refers more commonly to rock or jazz music, but all these words mean the same thing. Famous piano riffs include the opening of Dave Brubeck's "Take Five" and Billy Joel's "My Life".
To see how a piano riff works in practice, check out my "Bass Jazz Riff" at Sibelius Music. It's a simple little exercise using a chromatic bass line and a few simple 2-note chords. And even though the bass riff covers just a few notes, I think those sharps and flats add variety and interest. I hope you agree.
Ostinato, vamp, hook, lick
Dave Brubeck's famous tune "Take Five" relies heavily on the opening piano riff.

