Whenever you find a song or chord progression you wish to improvise over, there are several things you can do to help you become more familiar with the chords and which notes will sound good over them.
The first step is to analyze the progression in terms of chord numbers within the key (or keys). Just say you hear a progression you like, and a musician tells you it is 1 6 2 5 (commonly known as a turnaround progression). First you need to decide on a key to practice it in. For now, let’s choose A major. The chords would be A, F#m, Bm, E. Play through the arpeggios of these chords first to make sure you know them well.
The next step is to try improvising over the progression using only these chord tones. Remember that you can move from any note of one chord to any note of the next chord. If possible, approach the first note of a new chord by only a semitone or a tone as this creates a smooth sounding line. Often there are notes which are common to two or more chords. These notes are also good to use at the point of a chord change for the same reason.
It is also essential to know the appropriate modes which work over the chords.
Finally, practice improvising using the modes, being conscious of chord tones at each change.