The notes of Gmaj7 are G, B, D and F#. G is the root, B the major third, D the fifth and F# the major seventh. Said aloud, its notes are G, B, D and F sharp.
String by string, low to high, it plays G, B, D, G, B and F#. Of the six strings you play, two give G, the note that names the chord. It runs from G on string 6 up to F# on string 1.
The open strings add notes to Gmaj7 too. String 4 gives D, string 3 gives G and string 2 gives B. Your hand covers two frets, from 2 to 3. There is one more position, starting at fret 3.
Change only string 1 in Gmaj7 and you have G. Inside Gmaj7 sits a complete Bm chord, made of B, D and F#. Bm shares two positions with this shape.
Gmaj7 shows up in four keys. In G major it is the I, in D major the IV and in B minor the VI. The rest appear in the key list.