B Major chord in the 1st position bar chord below.

B – Root
D# – 3rd
F# – 5th
When played on guitar the notes are in this order B, F#, B, D#, F#. The B is the Root note. D# is the 3rd note in the B major scale and the F# is the 5th note in the B major scale.
We only strum the middle 4 strings, and mute the other string. The B major chord can be played in many places on the guitar. In this example, we are talking about the B in 1st position. The F#, B and D# notes can be played as a barre and eliminate the high F#. This makes fingering the chord much easier. The B chord could be barred as well. Also called a double bar because you are barring with the index (2nd fret) and the ring finger (4th fret) leaving out or muting the highest note.
Practice strumming the chord as well as picking the notes individually. Switch between the B, A, E, G, D and C major chords. Try and become smooth with your transitions.