There are five interlocking patterns that are usually taught for the pentatonic scale. Each of those 5 patterns line up along side each other to cover the entire fingerboard with one scale.
A minor pentatonic = A C D E G
Anywhere you find those notes on the fingerboard, it’s the A minor pentatonic scale. If you line up the 5 patterns correctly, each pattern will give you those same notes just at a different spot on the fingerboard.
If you move the starting pattern, you get a different “key”. It’s still minor pentatonic, but now it would be B minor if you moved everything up two frets or G minor if you moved everything down two frets.
A minor = C major
A minor pentatonic and C major pentatonic are the same notes. The difference is in how you apply the notes and what chords you might be playing the notes over.
If you line up the five patterns to get A minor up and down the fingerboard, Those same patterns in the same locations also give you C major.
Like before, if you move everything up two frets, you would get D major. If you move everything down two frets you would get Bb major.