All bar chords are derived from open chord shapes moved up the fretboard. The first finger of the left hand, bars all six strings to replace the nut. The following steps show how an open E major chord can form an F major bar chord.
E
Finger the open E major chord with the second, third and fourth fingers, therefore leaving the first finger free.
E
Now move this fingering of the open E major chord up the fretboard one fret.
F
Finally, lay the first finger across the first fret thus barring all six strings (as indicated by the thick line). By doing this, your first finger is doing the same job as the nut except one fret higher. A new chord, F major, is produced because the F note (or F chord) is always found one fret higher than E. The name of the chord changes from E to F but the type of chord (i.e., major) does not.