Some artists have come up with the following 8 practices that you need for improvisation:
1. Internalize the rhythmic nature of the music
2. Understand jazz theory (forms, harmonic progressions, scale/chord relationships)
3. Practice scales, arpeggios, patterns, phrases derived from the vocab of jazz
4. develop the ear
5. transcribe improvised solos by the masters
6. Memorize jazz compositions and standard repertoire
7. Listen and respond to other musicians whom you are playing with
8. Become attuend to the inner workings of the mind, the realtionship between your inner self and the music you create, and play spontaneously without undue premeditations