Find a representation of the B chord in tab format. You can easily follow the link in the first reference below and look at the first chord under the "B-Chord" category.
Interpret the tab. The six lines represent the six strings on the guitar. The line farthest to the left corresponds to the thickest string on the guitar and the string closest to you when you are holding it. The line to the far right corresponds to the thinnest string on the guitar, the string farthest away from you. The black dots on the particular lines indicate that those string must be held down on the particular frets of the guitar to make the chord.
Place your pinky finger on the fifth string on the fourth fret of the guitar.
Place your ring finger on the fourth string on the fourth fret.
Place your middle finger on the third string on the fourth fret of the guitar.
Press your index finger over the second to sixth string on the second fret. This will take care of the second and sixth string notes for the second fret.