(Click the character infographic to download.)
From pretty much the moment Harry meets Hermione in the Hogwarts Express in Book 1, we know that her main character trait is braininess. She studies hard and she cares a lot about learning, but she's also naturally brilliant. As she becomes friends with Ron and Harry, Hermione starts to loosen up a tad. But it's really in Chamber of Secrets that we get to see a less perfect side of her.
First, Hermione is actually taken in by extra-stupid Professor Lockhart. Right up until the end, she still seems charmed by his silly smile and his made-up stories of bravery. Hermione may be smart, but she's also a twelve-year-old girl, which means it's practically required for her to have embarrassing crushes. J.K. Rowling describes her conception of Hermione's character:
[Hermione] is really a caricature of me. I wasn't as clever as she is, nor do I think I was quite such a know-it-all, though former classmates might disagree. Like Hermione, I was obsessed with achieving academically, but this masked a huge insecurity. I think it is very common for plain young girls to feel this way. Similarly, her crushes on unsuitable men…well, I've made my mistakes in that area. Just because you've got a good brain doesn't mean you're any better than the next person at keeping your hormones under control! (source)
Poor Hermione's brain isn't enough to safeguard her from those hormones pointing at Lockhart. Still, her Lockhart crush isn't her only mistake in Book 2: Hermione also manages to turn herself into a cat-girl for several weeks by mistaking a cat hair on Millicent Bulstrode's robe for Millicent's own hair. When Hermione drinks her incorrectly made Polyjuice Potion, she sprouts ears, a tail, and fur all over her face. She is embarrassed and ashamed, but it does her no permanent harm. This error proves to Hermione that she can make mistakes without ruining her life. It makes her seem more human and well-rounded to the reader.
Even she does have a few bloopers here and there, Hermione is still utterly brilliant. She manages to sneak into Professor Snape's office to steal his private stores so that she can concoct a Polyjuice Potion to trick Malfoy into confessing he's the Heir of Slytherin. When Harry and Ron report back that Malfoy is not the Heir, Hermione figures out that the monster of Slytherin is a basilisk. While she is Petrified by the basilisk before she has a chance to report this information to her friends, the paper on the basilisk in her clenched fist gives Harry the final clue he needs to find the Chamber and fight the monster.
(Click the infographic to download.)
Hermione is a Muggle-born witch, which means both her parents are non-magical. This fact obviously sticks in the craw of pureblood bigot Draco Malfoy, who calls her a "Mudblood," a foul name for someone Muggle-born. As Hagrid points out, though, Draco is threatened by Hermione's genius. His father scolds Draco: "I would have thought you'd be ashamed that a girl of no wizard family beat you in every exam" (4.86). Hagrid reassures Hermione: "they haven't invented a spell our Hermione can' do" (7.112). Hermione's obvious intelligence and magical talent is proof that all of the prejudices people like the Malfoys feel against Muggle-borns are completely stupid. Her character provides all the evidence we need that that pureblood/halfblood/Mudblood nonsense that begins cropping up in Chamber of Secrets is pure bigotry.