This is the skill you need for jazz. Blues, rock, and many Non-Western (Section 2.8) traditions also use improvisation.
- Know your scales and arpeggios. A good improviser, given the name of a chord, can quickly play not only the notes of the chord but also the scale implied by the chord. Any decent book on playing jazz, or any teacher familiar with jazz, will introduce the student to these chords and scales.
- There are now many book/CD combinations available to help the beginning improviser in many different genres and on many different instruments. A good book of this type will give the student a chance to improvise on many familiar tunes, and some also introduce the music theory involved. At the time of this writing, one source of a large variety of such books was jazzbooks.com .
- The exercises at the petersax site mentioned above would also be useful for the beginning improviser.
- Listen to jazz often. Listen to the improvisers you admire, and if a particular solo really appeals to you, listen to it many times, find the notes on your instrument, and then try writing it down as accurately as you can. Many famous improvisors, when interviewed, mention how useful it was to them to learn from other soloists by transcribing their solos in this way.
- Figure out how to play your favorite jazz (or blues or rock) licks (short Motif that show up in many pieces in the same genre) on your instrument. Practice stringing them together in ways that make sense to you, but are different from what you've heard. Add your own variations.
- Find a teacher who is familiar with the type of improvisation you want to learn, join a jazz band, and/or get together with other musicians who also want to practise improvisation and take turns playing background/rhythm for each other.