The fretboard is an infinite loop (a circle of fifths/fourths machine) with limits (recall calculus.) Here's how it's done. Learn about CAGED, positional playing, circle of fifths/fourths, and modes.
Many people change keys using the circle of fifths/fourths. You can also change parallel modes using the circle of fifths/fourths. The guitar is tuned to the circle of fifths/fourths (except the B string), therefore it's very easy to change modes by moving a pattern down/up a string (accommodating the B string of course).
Parallel modes are basically when you change keys but emphasis the same note. For example, you're playing in the key of C. Change to the key of Bb (via circle of fourths if you want). And emphasize the C note. Since C is the 2nd note of Bb you are playing C Dorian. i.e. C major to C Dorian
There is another type of mode called "Relative." It's when you stay in the same key. The key of C is C D E F G A B. If you played those notes and emphasized the D you would be playing D Dorian. i.e. C major to D Dorian.
7SquaredGuitar combines the two, parallel and relative, for a total of 49 possibilities (within the major scale) of any note you want to focus on.