Justin does explain it really well.
Playing the scales is one thing.
And you must practice them around and around, over and over, preferably to a metronome or click track at differing speeds.
Alternate picking.
But using them purposefully is crucial to instilling them in your head and fingers.
When I was learning the minor pentatonic shapes I learned one pattern and I did not move on to the next pattern until I had really learned and used ... that is, played loads of scale practices ... 3-in-a-line, 4-in-a-line, random change of direction, string skipping etc etc etc ... and learned licks and played them over and over backwards, forwards, broken down and reconstituted .... and improvised over loads of backing tracks too.
You have to work with these licks, really work them.
Honestly and truly, you have to play one lick over a 3-4 minute backing track and really listen how it works over the chord changes.
Then do it with a different backing track that has a different tempo, vibe, groove.
You will find you play the lick differently again - it will say new things.
You will say new things with it.
Then start messing with the licks, to do something different, putting your own spin on them.
That is the key to improvising.