Learn to play the five basic pentatonic scale positions.
The most commonly used pentatonic scale is the minor pentatonic scale, which I have labeled as position 5. You can get a lot of mileage out of that one scale, but if you want to be able to improvise in different areas of the neck, you should learn the other four positions. I’ve numbered the scales based on the idea that the major pentatonic scale is the first in the series (the “position 1” scale). Thinking about the scales this way will prepare you for the diatonic scale box form patterns, and the modal system for those scales.
There are no fret numbers beside these diagrams, because you should try playing them at every position on the neck that you can reasonably reach. For those of you with an acoustic guitar, you won’t be able to go much higher than the twelfth fret; with an electric guitar, the seventeenth fret is about as high as you can go. Most guitar solos aren’t going to be much higher than that anyway, so there’s no reason to try to practice them at frets higher than that.
Be sure that you pay attention to the fingerings, and resist the temptation to use your first and third finger instead of the second and fourth on scales like position four. Using the correct fingerings will make you more prepared for the kinds of patterns you’ll encounter when you learn the diatonic scales.