I think everybody's technique differs for improv but this is my two cents:
If I was improvising over an Am backing track I would tend to use some A minor blues/pentatonic scale (Any of the 5 shapes), for a certain type of sound - Most of the work I do with this scale is letting my ears guide me to a melody I'm trying to hear.
I also use a lot of arpeggios when I play, to get more colors against the chords - For this stuff, knowing the overall Key of Am is your best friend! I look at the key of Am - (Related to C Major) Am, Bhalf dim, C Maj, Dmaj, Emin, Fmaj, Gmaj - and I play the arpeggios that lie on the chord tones of Amin (A, C, E) So I get Amin arpeggio, Cmaj arpeggio and E min arpeggio.
If I could boil my technique down to 4 things it would be Knowledge of a Key, Pentatonics ,Arpeggios & most importantly Ears! - all with chromatic notes in between if needed.
The 100% most important thing is that you play what you want to hear - like practice putting a backing track on and seeing where your ears lead you without thinking too much about it, then try and imagine what you'd play over something and then try and figure it out - - all of these things will develop your ear & your sense of melody. You want to use the shapes you know to bring out what you want to play/hear verses having the shapes dictate the sound of what you do, if that makes any sense
Overall, you'll learn most by experimenting with sounds - the hard part is trying not to overthink it!