The full plot of Harry Potter and the Prisoner of Azkaban turns on a betrayal that Harry has misunderstood. After he flees the Dursleys, Harry is told that Sirius Black, said to have helped Voldemort kill his parents, has broken out of Azkaban. At school the Dementors affect Harry badly. A new teacher, Remus Lupin, drives one off on the train and later teaches Harry to defend himself with a Patronus charm.
Harry sneaks into Hogsmeade using the Marauder's Map he got from Fred and George, and overhears that Black was his parents' friend and betrayed them. Meanwhile Buckbeak the hippogriff is sentenced to death after Draco Malfoy provokes him. On the night of the execution, a large black dog pulls Ron into a tunnel under the Whomping Willow, and Harry and Hermione follow.
The dog turns out to be Black, who is an Animagus, and he explains that the real traitor is Peter Pettigrew. Pettigrew has been hiding for years as Ron's pet rat, Scabbers. Lupin arrives and joins them, and the group is ready to deal with Pettigrew. Lupin then turns into a werewolf under the full moon, and Pettigrew escapes in the chaos.
The Dementors close in on Harry and Black, and Black is captured and condemned to the Dementor's Kiss. Dumbledore hints that Harry and Hermione can use her Time-Turner to change the night. They go back in time, free Buckbeak, and Harry sees that the Patronus that saved him earlier was cast by himself. Together they help Black escape on Buckbeak, and Lupin resigns once his condition becomes public.