What is a character flaw? It is usually used to describe some sort of quirk to a persons personality , that prevents them from being a perfect person. This flaw can lead to major issues through the story, usually in the form of loss of relationships or life threatening situations. However they can also draw people to the person showing the flaw, as people are intimidated by perfection. Flaws are part of what separate a well written character from an easily predictable cardboard cutout. A character has to have weaknesses or no one will ever expect it to have any problems, and why read a story if you know exactly how it will turn out the very first time you read it?
Of course having someone be all flaws is a bad idea too, as it is much harder to sympathize with someone who has no strengths. You literally, can't pick out something he could do to help the situation. A flaw doesn't exactly have to be a bad thing either. For example in the Percy Jackson and the Olympians book series, the protagonist, Percy, is told that his fatal flaw is loyalty. I know it sounds incredibly respectable and is actually a nice thing to be a loyal person. But in this context, it means he will never doubt or betray the people he cares about. His faith in his friends will not waver, until he is given absolute proof, he will not believe that they have done anything wrong. So if he chooses the wrong friends this character trait could easily become very fatal. At the same time, his loyalty attracts people to him though, after all, he will never give up on you, and lots of people appreciate that.
A good character flaw is like that, you know it could get your character killed, but you also know you can't change it without changing your character in dangerous ways either, and changing it could also lose them some of the connections they hold onto. Character flaws don't have to be permanent, heck you could have entire sections of your story devoted to them getting rid of that flaw. But usually, it gets replaced with another character flaw. Back to the Percy example: If Percy Jackson were to lose his loyalty flaw, it would likely be a traumatic experience that would change his entire character. If the trauma is extreme enough, he might jump to the opposite side of the spectrum and start betraying people fairly often because he couldn't believe in anyone anymore. A deep seated character flaw has to be treated with extreme care because it is a part of who they are and you can't just rip it out without consequences.
There is another type of flaw though, the physical weaknesses of a character. The most famous example I can think of for this type of flaw is Superman under the affects of kryptonite, where just getting near it makes him incredibly weak. Another less extreme example would be having a limp, or not being able to swim. These flaws are naturally dangerous because they can result in physical dangers when in the wrong situations. But they are not necessarily as permanent, Superman can get away from/destroy the kryptonite, People can learn to swim normally. However, they can be completely permanent too. like maybe the limp is from a peg leg, or I can't swim because the moment I touch water, the electricity coursing through my body spreads out through the water and damages everything the water touches, including me. Superman will never get over kryptonite.
Either way though, character flaws are important because they pull the people in your stories away from the realms of unstoppable. If a character reaches unstoppable and you haven't used some earlier character flaw to give him a weakness, then you have to start relying on the powers of dues ex machina to get you out of a situation. Unless something like that is well written, it feels like a cop out, and some people won't appreciate it.
My reasons for writing this post? I hope I give all of my characters good enough flaws that I never have a Unbeatable god introduced as a main cast member. As I was thinking on that I wondered what exactly I would describe as a character flaw and decided to write this post about my thoughts. The Spaceballs picture is also naturally, about how a good villain is willing to take advantage of a heroes standard flaws in order to win.
Picture from a google search on an example I remembered from Spaceballs, the movie.