I know characters aren't supposed to overcome all their flaws by the story's end. How do I know which flaws they overcome and which they retain in the end? What factors do I consider to determine what do to?
Also, does this apply only to the most important characters or can some minor characters grow and change too? Or are minor characters supposed to stay the same throughout the story?
Just as a person in real life can affect those around them, your main character changing can make his/her close friends change as well. Sometimes it's seeing the impact on another's life that spurs a character to change. (If a secondary character sees how miserable the main character is and decides to be a more cheerful, giving person, for example)
Characters, like real people, rarely change completely. Rather than stepping from black to white, they lighten to a shade of grey.
If your character started off as a jerk who cursed every 4th word and kicked puppies into traffic, by the end he might be a tough guy, who still curses, just not as much. Instead of randomly inflicting pain on innocent animals, he can focus on causing trouble for those who interfere with his friends.
There's usually an awkward middle ground as a character changes when they're not comfortable in their skin. Their behavior is unfamiliar and they're not sure how to implement it. (Your tough guy might want to make a gesture of giving flowers, but the flower shop is closed. Rather than go on-line and order some, he could rip up a rosebush from someone's yard, steal them from a cemetary or even give his girl a packet of seeds. The thought is still there, he just didn't execute it properly)