In the book, Harry's summer with the Dursleys is miserable, as they punish him repeatedly at the mere mentioning or suggestion of the word "magic". Dobby splatters the pie over the kitchen floor, but the Masons leave anyway when an owl flies in the house which startles them, carrying a message for Harry from the Ministery of Magic that he has broken the law by practising magic as a minor outside of Hogwarts (they apparently did not detect that it was done by Dobby). Harry is locked in his bedroom for three days, unable to free himself because another display of magic will get him expelled from school.
After the breakout, Harry spends the rest of the summer with the Weasleys, assisting the Weasley brothers as they de-gnome the garden as punishment for stealing the flying car. As he uses the Floo network to go meet Hermione in Diagon Alley and mistakenly ends up in a shop in Knockturn Alley, he witnesses Draco Malfoy and his father, Lucius, selling some dark items for fear of being discovered while carrying them (this scene was filmed but deleted from the movie).
Harry makes a stop at Gringotts bank to withdraw some money, where his inherited wealth contrasts painfully with the Weasley's meager possessions. While at Flourish and Blotts, Gilderoy Lockhart already announces his recent appointment as Defence Against the Dark Arts teacher at Hogwarts, and Arthur Weasley's argument with Lucius Malfoy escalates to the point where the two men have to be physically restrained by Hagrid.
While driving the flying Ford to Hogwarts, the movie contains a scene where the car gets in front of the train, and Harry almost falls out. This scene is not in the book.
It is Snape who catches Ron and Harry outside the Great Hall, not Filch. Professor McGonagall informs the boys that in their absence, Ginny has been selected into Gryffindor house. Hermione berates the boys for their reckless behavior with the car, but they find that the other Gryffindor boys regard them as heroes for such audacity.
At Herbology class, Professor Sprout displays annoyance over Professor Lockhart's unsollicited advice in treating the damaged Whomping Willow. Lockhart is apparently mistaking Harry's sincere efforts to get to Hogwarts as attempts to draw attention and become famous, and keeps providing him with unwanted advice throughout several chapters. During Herbology class, Justin Finch-Fletchley introduces himself as a Muggle-born student (in an deleted scene, he was introduced during the Duelling class).
Hagrid is the next person to criticize Lockhart for his know-it-all attitude and continuous bragging; he mentions that Lockhart was the only applicant for the vacancy of Defence Against the Dark Arts teacher. The post is rumored to be jinxed, since no recent teacher has been able to stay in the position for over a year.
Coming from a particularly rained out Quidditch practice, Harry meets Gryffindor's house ghost, sir Nearly-Headless Nick, but is nearly punished by Mr Filch for dripping mud and water on the floor; however, when Filch has to leave briefly to get rid of Peeves the mischievous poltergeist, Harry notices that Filch keeps a course for something called "Kwikspell" on his desk. Filch is so embarrassed that Harry has found it, that he lets him go. Upon leaving, Nick confesses that he arranged for Peeves to create a distraction for Harry, and would like the presence of Harry and his friends on his Deathsday Party. They attend the party and also meet Moaning Myrtle for the first time; however, the presence of Peeves causes quite some disharmony, prompting the trio to leave. The movie picks up when Harry hears the voice for the second time while serving detention with Lockhart and they discover Mr Filch's Petrified cat. Filch is quick to accuse Harry of targeting him for being a Squib. Harry has no idea what a Squib is, but Ron later explains that a Squib is someone born from magical parents, but without magical powers himself; the "Kwikspell" is a course that Squibs can follow to appear able to perform magic.
The supposed opening of the Chamber of Secrets and Harry's unexplained presence near the victims causes more and more people to suspect him of being the Heir of Slytherin. The legend of the Chamber is told during one of Professor Binns' History lessons (in the movie, it is during one of Professor McGonagall's Transfiguration lessons, since Binns was excluded from all movies). They soon discover that an unused girl's bathroom is overflowing and that spiders are fleeing from the scene; but upon exiting the bathroom, they are caught by Percey Weasley, who deducts points for entering the off-limits area.
The production of the Polyjuice Potion requires quite a lot more effort from the trio in the book. During a Defence class, which Lockhart abuses to show off on his heroic deeds once more, Hermione tricks him into signing a paper that will allow her to obtain the book with the potion's recipe from the library's restricted section. They also need to distract Snape during Potion class, so Hermione can sneak into his cabinet and obtain two rare ingredients for the potion.
The Quidditch match plays out mostly like in the movie, only that Draco does not notice the Golden Snitch and does not get injured during the match while pursing it (in the book he gets reprimanded by the team captain for failing to notice the Snitch hovering above his left ear, as he was too distracted with insulting Harry Potter). During the Duelling class, Hermione obtains some hairs from Millicent Bullstrode for the Polyjuice Potion during a bout of wrestling (which ends with Hermione in a headlock). Afterwards, Harry overhears several students who mention that Justin got into hiding because everyone now believes that Harry is the Heir of Slytherin, and has it in for all Muggle-borns (a scene filmed, but deleted). While leaving, Harry bumps into Hagrid who comments that something is killing his roosters. Harry proceeds down the hall, discovering a Petrified Justin. Sir Nick appears black and smouldering due to being Petrified, and Peeves is the one to discover Harry at the scene, warning McGonagall.
Fred and George joke around, yelling, "make way for the Heir", wherever Harry goes (also filmed and deleted). Although Harry appreciates the twins' effort to defuse the tense situation, Ginny makes a distraught impression.
While disguised as Crabbe and Goyle, Ron and Harry find out from Draco that Mr Weasley is facing fines on his work due to his illegal tampering with a Muggle car. It is revealed that Draco has already learned from his father that the Chamber was opened 50 years ago, but his father wouldn't say who got convicted for it; Lucius hinted at the reopening of the Chamber, but urged Draco not to get involved. Draco also confesses that his family keeps a lot of Dark Objects in a secret room below their manor.
Upon finding Tom Riddle's diary, Ron remembers seeing an award for "special services to the school" presented to a Tom M. Riddle during one of his detentions (another deleted scene). Hermione, noticing the diary has dates corresponding with the first opening of the Chamber of Secrets, tries several revealing spells on it, to no avail. Lockhart boastfully claims credit for the fact that no recent attacks have taken place, and organises a celebratory Valentine's Day special. A Valentine's card directed to a reluctant Harry causes a lot of mayhem and another one of Malfoy's taunts, in which ink spills over Riddle's diary, but Harry notices that no ink stains appear on the pages, prompting him to try writing in it. In the memory contained in Riddle's diary, Tom Riddle is seen talking with headmaster Dippet instead of Dumbledore (the latter only making a short appearance).
Harry's time is absorbed by strenuous Quidditch training prior to the match against Hufflepuff, and deciding which courses to take in his next year. On his way to the match, he hears the voice for the third time, prompting Hermione to run into the library with a sudden hunch. The match itself is cancelled when both Hermione and Ravenclaw student Penelope Clearwater are found Petrified (Penelope is not a Basilisk victim in the film). With one of his close friends among the victims, Harry is no longer a suspect; Lockhart triumphantly announces that Hagrid was the culprit, much to the chagrin of Ron and Harry.
Two weeks after Hagrid's arrest, Harry and Ron notice a group of fleeing spiders again, and follow them into the Forbidden Forest (this happens on the night of Hagrid's arrest in the movie). When they discover the Weasley's flying car in the forest (deleted scene), large spiders grab them and take them to Aragog, who resents the intrusion and immediately orders his children to kill the boys; Harry manages to stall them with his questions, until they are rescued by the car. Through Aragog's story, Harry already deduces that the girl killed fifty years ago could be Moaning Myrtle (in the movie, he doesn't find out until he discovers Hermione's note).
Due to tight security and unexpected scheduling of final exams, Ron and Harry have to wait for several days to talk to Moaning Myrtle. Ginny wants to say something important to Harry, but she is silenced by Percy, and leaves. Harry and Ron trick Lockhart into letting them wander around unescorted, since the danger has passed anyway. They lie to McGonagall that they are on their way to Hermione in the hospital, which actually forces them to go there, but it leads to the fortunate discovery of the note explaining the monster is a Basilisk. The note also explains that a rooster's crow is fatal to a Basilisk, explaining why someone was killing Hagrid's roosters.
While in the Chamber of Secrets, Tom Riddle's is a ghost-like apparition which solidifies as Ginny is slowly dying (unlike in the movie, where he looks like a physical being the entire time). It turns out he has been communicating with Ginny all year long through writings in his diary, gradually earning her trust and finally physically possessing her, forcing her to do his bidding (including killing Hagrid's roosters). Tom reveals that his first name came from his Muggle father, and his second name, Marvolo, comes from his maternal grandfather, a direct descendant of Salazar Slytherin. He also demands to know how baby Harry managed to defeat the adult Voldemort; Harry tells him it was through his mother's sacrifice.
As the Basilisk is blinded, Tom urges it to use its smell to locate Harry (in the movie, the Basilisk uses sound). Harry obtains the Gryffindor sword by putting the Sorting Hat on his head and thinking "Help me!"; he can feel the sword falling on his head. As Fawkes lands next to a poisoned Harry, Riddle tries to kill it with a Killing curse, but Fawkes quickly drops the diary into Harry's lap, who pierces it with the Basilisk fang from his arm.
As Fawkes carries everyone out of the cave to safety, the entire ordeal is recounted in Professor McGonagall's office, where the Weasleys have arrived in the meantime. Dumbledore mentions that the "real" Voldemort is currently hiding in Albania, but he is quick to assure the Weasleys that Ginny was cursed by one of his memories and is therefore not to blame, since Voldemort managed to deceive much more experienced wizards and witches. A confused Gilderoy Lockhart is taken to the hospital. As Lucius Malfoy comes in to demand explanation, Dumbledore subtly suggests that the whole idea of cursing Ginny's was to discredit Arthur Weasley, and that if Lucius ever tries again, Arthur will surely expose him. In the remainder of the year, Lucius is fired from Hogwarts' board of Governors. Ginny mentions that she had tried to warn Harry about the dark influence of the diary earlier, but that Percy silenced her, thinking she wanted to reveal that Percy had a secret relationship with Penelope Clearwater (information the Weasley twins will surely abuse in their ongoing pranking).