A riff is a short melodic phrase, typically one or two bars long, that repeats with small variations across a whole chorus. In this piece, you play the same two-bar riff six times across a 12-bar blues. Repetition and groove, not variety, are what make a riff work.
The riff contains a new kind of note: a blue note. In C major, the natural third is E; the blues flavor comes from playing Eb instead — a flat third — right in the middle of a major-key context. The half-step clash between Eb (the blues) and E (the tonic major) is not an error. It is the signature sound of the blues.
A working set of notes that emphasizes this quality is the blues scale — the major scale with a few flats added (most importantly the flat third, also a flat fifth and a flat seventh for full color). You don't need to memorize the full scale yet; just hear that the Eb in this riff sounds right against a piece that would otherwise be in plain C major.
Play the riff the same way every time. Do not vary it — not yet. Twelve bars of a consistent riff over an obvious form teaches groove, which is worth more at this stage than creativity. Keep the pulse steady all the way through the chorus.
Open this exact piece in SightPiano and practice with a metronome and notation — free, full-featured, no time limit on the beginner curriculum.