The blues started not as a piano style, but as a vocal style, and of course the human voice can sing "in the cracks" between the notes on the keyboard. So when we play blues on the keyboard, we try to imitate the human voice by playing BOTH the 3rd and the flat 3rd -- BOTH the 5th and the flat 5th -- BOTH the 7th and the flat 7th. We would play in the cracks if we could, but we can't, so we do the best we can by combining the intervals to imitate the quarter steps that a human voice can sing. (Certain instruments can do that too -- for example, the trombone. Since it has a slide, it can hit an infinite number of tones between any two keyboard notes.)
So in the key of C, for example, the blues scale would include:
C, D, Eb, E, F, Gb, G, A, Bb, B, and the octave C.
In the key of F the blues scale would include:
F, G, Ab, A, Bb, Cb, C, D, Eb, E, and the octave F.
In the key of G the blues scale would include:
G, A, Bb, B, C, Db, D, E, F, F#, and the octave G.
So in improvising you can craft a melody out of any or all of these notes. Start by creating a motif out of just 3 or 4 notes, then repeat that motif as you change chords.
For example, if you were in the Key of C, you might create a motif such as C, C, G, Bb C and repeat it in various rhythms as you play the C7 chord in your left hand, then again as you move to the F7 chord, and so on.
With practice and experimentation you can play your own variety of the blues as you master the blues scale.
For more info on the subject, please go to http://playpiano.com/101-tips/31-12-bar-blues.htm
Duane Shinn is the author of over 500 music books and music educational materials such as DVD's, CD's, musical games for kids, chord charts, musical software, and piano lesson instructional courses for adults. A free lesson on music notes and music theory is available: "Music Notes & Flat Key Signatures" Duane holds advanced degrees from Southern Oregon University. You can sign up for his free 101-week online e-mail newsletter titled Amazing Secrets Of Exciting Piano Chords & Sizzling Chord Progressions" which now has over 70,000 current subscribers worldwide.