The steps in learning to improvise, as I see and remember them, are:
1. Learning to hear and identify chords and chord changes (I got a head start when a new friend my freshman year of college asked me if I would play tuba in his Dixieland band; I had to learn root progressions and bass lines).
2. Learning to hear lines/melodies in my head which might fit those chord progressions.
3. Developing the technique on my instrument(s) to be able to channel those mental melodies into actual sound.
4. Maturing (or aging) to the point that real and interesting melodies appear, which means, to some extent, getting beyond the technique aspect. Lots of technique gives you options, but one of the options should not be technique for its own sake. I think that is a mistake made by a lot of younger players, and some of them never get beyond it.*
*This could lead to an entire discussion of the evolution of trombone technique, from J.J. Johnson showing that the trombone was capable of the type of technique which enabled him to keep up with the likes of Dizzy, Bird, etc. J.J. took that melodious style that the trombone is so capable of and transitioned it into the bop style that developed in the late '30s and '40s. I think the part that some players missed is that J. always played very melodically, no matter what the tempo. This may have spawned an entire generation of "technique for the sake of technique) players. Exceptions, of course, include Frank Rosolino, who was unbelievably technically adept, definitely had his own voice and style, but still played very musically; and Carl Fontana, a technical wizard who still played linearly and musically, another unique voice. (Frank and Carl, as different from one another musically as they could be, were still a "mutual admiration society.") There were earlier players who had astounding technique but were more "old-school," like Abe Lincoln and Tommy Turk. The melodic swing-era players that were heroes of the trombone were the likes of Lawrence Brown, Jack Teagarden and Trummy Young. Brown became a hero of mine at a young age, when my dad brought home a double album (remember those?) of Duke Ellington recordings from the late '30s-early '40s. Lawrence was unbelievable to me for his versatility of style, and remains so to this day. Later on I glommed onto the playing of Urbie Green, another player with amazing versatility, great chops, musicality and style. Others have contributed to my musical persona, I'm sure, but my heart belongs to those older players who knew how to sing a song through their instruments.