Learning how to play barre (bar) chords is always going to be one of the most difficult techniques beginner guitarists will face. The good news is that they CAN be learned, it just takes a fair amount of practice and dedication. Good things don't come easy, but with enough time, you'll be laughing when you think back to not being able to play them, I promise.
The key to playing bar chords is getting used to the correct technique, than practicing it over and over again every day, for as long as you need to. Getting it right might take a few weeks or a few months, it really depends on how well you learn the basic technique of how to bar chords, and how much you practice them. Here are a couple of tips on the correct method of barring chords.