"Riff" is abbreviation of rhythm and, in rawk music anyway, is generally a repeated musical pattern played on (electric) guitar underneath the vocals.
A "solo" is when an individual instrument, usually but not always an electric guitar, plays a melody in an instrumental interlude above the other instruments.
Free's "All Right Now" is a classic example both of one of the most famous riffs and solos in popular music. Mark Knopfler plays the famous riff as an introduction and then underneath Paul Rogers' vocals. The solo begins after the first couple of minutes.