Build a G major chord. The G major chord consists of G, B and D.
Place the B in the bass so that it is the lowest note played.
Position the other notes above the B so that the chord is completed. You must include the G and D somewhere above the B. Preferable the G and D should not be separated by more than an octave.
Play B on the 2nd fret, D on the 3rd fret and G on the open G string to play this chord on guitar. On piano, just place B in the bass and then play G and D on top.