Familiarize yourself with the blues scale. A basic blues scale is a major scale that contains flatted third note, a flatted fifth note, and a flatted seventh note. The notes of a C major scale are C-D-E-F-G-A-B and the octave C. The third, fifth and seventh notes of that scale are E-G and B. Those notes are played flat in a C major scale. They are considered the blue notes. This scale will work over the 12-bar blues progression in any key.
Learn the 12-bar blues progression. This is a set pattern of chords that takes up 12 bars (measure) and repeats over and over. It is the basis for the blues. The pattern is built in a major key and based on position degrees in the scale. The pattern is always the same. There are four bars of the chord built on the first note in the scale, two bars of the chord built on the fourth note in the scale, two more bars of the chord built on the first note of the scale, one bar of the chord built on the fifth note of the scale, one bar of the chord built on the fourth note of the scale, and two bars of the chord built on the first note in the scale. In C, the twelve-bar blues is C-C-C-C-F-F-C-C-G-F-C-C.
Learn the chords you need to play the 12-bar blues in C (from the previous step). There are many different ways to play these chords on guitar and piano. A basic chord book is something to have on hand as your musical skills progress. You can find chord dictionaries online at no charge (see resources). Work on these chords until you can switch between them smoothly, then record yourself playing the 12-bar progression several times so you can use it as a backing track to practice your blues scale against. To add variety and a bluesier feel to the progression, try substituting the seventh note of the scale in place of the flatted seventh. Play a B instead of a B flat, then play a B flat followed by a B. You will hear how this sound fits into traditional blues.
Practice playing the C blues scale over the progression you recorded. Don't worry about the notes you play or whether they will go or not. The blues scale is meant to sound good played in this context. You can play short runs of fast notes, change the rhythm of the notes you play, or double the chords on the recording. Improvise. Playing blues is about 60 percent heart and many blues players make it up as they go, relying on feel rather than technical proficiency.