Many beginning players find barre chords difficult to play cleanly in the beginning. You must build enough grip strength to cleanly fret all of the barred chords.
It also helps to have a properly set up guitar with lower action and lighter strings.
Depending on the anatomy and length of your fingers, you must discover the optimal way to position your barring finger for each type barre chord.
I play some barre chord formations with my thumb perpendicular to the neck while others require me to place my thumb closer to parallel to the neck. With my short fingers, I must rotate my wrist towards the headstock such that the outside edge of my fretting finger is contacting the strings and my thumb is slanted as well.
Any chord formation that is played in open position can also be played as a barre chord. Barre chords are basically open chord formations using the barre finger like a capo to change the pitch of the chord. The most common barre chords are the "A shaped" and "E shaped" barre chords. I would strive to learn those first. Between those two chords you can cover the entire range of chords from A to G.
I find the E shaped barre chord the easiest to play. When I play it my thumb is pointing towards the headstock more than towards the ceiling (parallel to neck).
To play the A shaped Barre chord you must form a "mini barre" with your middle finger to fret the d, g and b string. To Play a B chord or B flat chord, you will use the A shaped barre chord if you are playing in first position. When I play an A shaped major barre chord, my thumb is pointed towards the ceiling (perpendicular).
There are some excellent answers to describe effective ways to form the "A Shaped" Barre Chord under This Question
After you master the basic E and A shaped barre chord formations you can try the "C Shape" and the "D shape". The A and C and D shape involve playing only 4 or 5 strings - just like the corresponding open chord. If you find it easier - you can extend the barre finger all the way to the top of the fingerboard, but only strum the appropriate strings or slightly lift the barre finger so that the low E is muted if it is not a part of the chord.
You will find that playing a D shaped chord as a barre will end up being a 4 string version of the C shaped barre chord for the same chord. For example if you play an F major by barring the 5th fret and playing a C shape with the non barring fingers the top four strings (e,b,g and d) are fretted in the same place (but with different fingers) as if you play an F major by barring the 3rd fret and playing a D shape with the non barring fingers. The version that you use might depend on what you intend to do either immediately before or after playing the chord. Often the transition works better with one version or the other.
Barre chords are very useful for guitar players and it's worth putting in the practice time and strength building exercises to be able to effectively play at least the E and A shaped versions. Keep working at it and you will find what works effectively for you.