B is made of these notes: B (root), D# (major third), F# (fifth).
With this shape the strings sound like this, from the D string to the D string: F#, B, D#, F#.
A major chord sounds bright, solid and happy. With just three major chords you can already accompany lots of songs.
B belongs to these major keys: B major (degree I), F sharp major (degree IV), E major (degree V).