A riff is a cluster or sequence of notes or chords. A riff is used in a song. It can be repeated over and over again, but it may only be heard once, say for instance, in a lead guitar solo. Riffs can be minor decorative elements or they can be the basis of a song. Riffs are sometimes very memorable - they can be the most immediately recognizable thing about a song. Guitar riffs are obviously very nifty, on the other hand, guitar rifts do not exists. A rift is literally a division, split or break. Broken guitars are very hard to play and they don't sound so good.
Classic guitar riffs include the opening chord sequence in I Can't Get No Satisfaction by the Rolling Stones, or Long Train Running by the Doobie Brothers.