At the end of the first book, Harry, Ron, and Hermione try to retrieve the Philosopher's Stone. On the way, they encounter seven obstacles. Each obstacle foreshadows/symbolises something about the corresponding book in the series.
As a refresher, the seven traps in order are:
- The trapdoor guarded by Fluffy
- The Devil's Snare
- The flying key room
- The chess game
- The troll
- The potion logic puzzle
- The Mirror of Erised
1. The trapdoor: This one is set up by Hagrid. The first book is focussed quite a lot on Hagrid. He introduces Harry to the wizarding world, and is one of the first friends that Harry makes at Hogwarts. There's the subplot involving Hagrid and the baby dragon. Additionally, the trapdoor represents the gateway into seven years of magical adventures.
2. The Devil's Snare: Herbology plays a bigger role than usual because of the suspense of growing Mandrakes to cure petrification. However, the best way to describe the foreshadowing is the way I first heard it:
"Something green is trying to kill people. A Weasley who is in danger of being killed is saved by a burst of fire."
3. The flying key room: The subplots of the third book focus much more on flying, especially on how Harry loses his Nimbus 2000 and gets a replacement Firebolt. There's the events surrounding Buckbeak that culminate in Harry and Hermione riding him. This is the only book that describe each Quidditch match in detail: in all the other books, at least one match is only mentioned in passing. Finally, this is the only room that could not kill people. The third book is the only book that Voldemort does not appear in.
4. The chess game: Really, the Triwizard Tournament is all a big game, just with a high chance of death. You know, like if you were playing wizard chess with yourself as one of the pieces. Three pieces get replaced, and there are supposed to be three competitors. Additionally, this is the room that Ron gets knocked unconscious, which foreshadows the death of Cedric.
5. The troll: This is Quirrell's trap but not much happens here. Because Voldemort is busy possessing Quirrell's body, this could be considered as Voldemort's trap. At the end of the fifth book, Voldemort sets up a trap to get Harry to go to the Department of Mysteries.
6. The potion logic puzzle: The sixth book is heavily focussed on potions. The introduction of a new Potions teacher is a big shocker, and Slughorn is intimately tied to many major plot points. Slughorn's memory, Ron's poisoning, and the Slug Club comes to mind. There is the Half Blood Prince, which Snape is revealed as. However, the clincher is that this is the book when we learn that Voldemort split his soul into seven pieces. Harry must find all of them if he is to beat Voldemort. The trap has Harry and Hermione attempt to find the identities of seven different potions. Also, something I've just realised now is that of the seven potions, three were poison. Three people die actively trying to destroy the parts of Voldemort's soul: Regulus, Dumbledore, and Harry. (I don't count Goyle because his death was unintentional).
7. The mirror: This is Dumbledore's trap and this is the book that goes the deepest into exploring Dumbledore's past and motivations. Harry could only get the Stone if his desire was to stop Voldemort and nothing more; Harry could only be the master of all three Hallows if he learned to not be afraid of death. In both cases, he is alone in the final confrontation. Oh, and Voldemort loses.
— Quora user Alexander Irpan