Pentatonic scales are just abbreviated, 5 note versions of full, 8 note scales. Learn the full scales and then you have more notes to choose from. The scales used, as mentioned above, tend to reflect the chords they’re being played over. As a starting point learn the major (Ionian scale), minor (Dorian or Aeolian) and dominant 7th (Mixolydian). These three will give you all you need to play over a major or minor 12 bar blues. I find the most important thing is to hit the chord tones (the major third over a major Chris for instance), so that you imply that chord with your note choice. However, don’t be constrained by the scales, go ‘outside’ them, a short, chromatic run can add interesting ’flavour’ to your solos.