Same note, just higher or lower than the root. With the 1st position of the Major scale, you can make that Amajor by moving the root note on the low E string up to the 5th fret. Hence, the A major scale. By memorizing these you can play in any key by finding the root note somewhere on the fretboard. Make a recording of just the G major chord, then play the scale, and improvise something over it.
Minor scales are the same as the relative major scales, except that they start on a different note.
The scales above you can use over Eminor, because Eminor is Gmajor's relative key. This means, that the notes are the same in both scales, and the chords are the same, it would just be that Eminor is the most prominent chord. Most rock music is in Eminor, minor keys are very dark sounding, whereas major chords, sound happy, or bright. These are the 5 Pentatonic scale positions. Pentatonic can be thought of as Eminor Pentatonic.