I'll give you an example with the minor pentatonic scale. This will be the most common explanation, no 'snake oil'.
Let's take G minor pentatonic. G minor pentatonic contains the notes G, Bb, C, D and F. If you express those as scalar intervals, you have 1, b3, 4, 5 and b7. If you find every instance of those notes on the fretboard, it looks like this:
Let's take G minor pentatonic. G minor pentatonic contains the notes G, Bb, C, D and F. If you express those as scalar intervals, you have 1, b3, 4, 5 and b7. If you find every instance of those notes on the fretboard, it looks like this:
So those are all the notes of the scale over a 12-fret range from fret 3 to fret 15. 12 frets is one octave. This pattern will repeat if you go higher than the 15th fret. So this is the complete picture for G minor pentatonic.
If you were playing 'all over the fretboard', in G minor pentatonic, you'd be hitting all these notes. It's this 'map' which you would have to know or 'internalise'. Internalise is a better word, because you're talking about muscle memory, not just knowledge.
The most typical (and totally adequate) way to learn the entire map is to divide it up into 5 sections, sometimes called 'boxes' or 'positions'. Here is the same map of notes divided up into those 5 sections:
If you were playing 'all over the fretboard', in G minor pentatonic, you'd be hitting all these notes. It's this 'map' which you would have to know or 'internalise'. Internalise is a better word, because you're talking about muscle memory, not just knowledge.
The most typical (and totally adequate) way to learn the entire map is to divide it up into 5 sections, sometimes called 'boxes' or 'positions'. Here is the same map of notes divided up into those 5 sections:
A guitarist would typically learn each one of these patterns as a separate entity at first, and practice using them to improvise. Over time, the patterns become more familiar, and eventually they start to merge together as the guitarist improvises lines that flow from one pattern to another. The mind is capable of doing a lot of the 'stitching together' without necessarily focusing on it.
However, you can also devise exercises and routines to deliberately speed up the process of merging the patterns. An example would be practicing 'diagonal' patterns, which cut across the fretboard from position to position:
However, you can also devise exercises and routines to deliberately speed up the process of merging the patterns. An example would be practicing 'diagonal' patterns, which cut across the fretboard from position to position:
These diagonal patterns are actually extremely usable - but I would still recommend starting with the 'box' patterns.
Or 'horizontal' patterns, which travel up individual strings or pairs of strings (back to G minor):
If you practice the note set for any given scale (whether it's pentatonic or based off the major/minor scales and modes etc) in this way, then you'll be able to play it all over the fretboard.
I've created a course called 'Technical Training' which is free to use and it's found at Technical Training. It is designed for blues guitarists who want to increase proficiency in the minor pentatonic and it has video demos of all the practice exercises etc.
This 5 position system is something you might also come across described as the 'CAGED' system. I would recommend getting it under your fingers practically before getting too stuck into the theory of it.