In the fourth book of the Harry Potter series, “Goblet of Fire,” the titular character finds his name magically placed into the eponymous goblet, which is a magical object used to choose champions for the Triwizard Tournament. This event is a dangerous and prestigious international competition held between the three largest wizarding schools: Hogwarts School of Witchcraft and Wizardry, Beauxbatons Academy of Magic, and Durmstrang Institute.
The question of who put Harry’s name in the goblet is a central mystery in the book and is eventually revealed to be the work of Peter Pettigrew, a former friend of Harry’s parents who had faked his own death and was working as the servant of the main antagonist, Lord Voldemort.
Pettigrew had disguised himself as a rat and used his magical powers to alter the goblet’s magic so that it would choose Harry as a champion. This was part of a plan by Voldemort to use the Triwizard Tournament as a way to bring Harry to him, as the Dark Lord believed that Harry was the only one who could defeat him.
However, the plan ultimately backfires on Pettigrew and Voldemort, as Harry is able to survive the tournament and ultimately defeat the Dark Lord in a final showdown at the end of the book.
It is worth noting that Harry’s name being placed in the goblet was not the only manipulation of the tournament by the villains. The Durmstrang champion, Viktor Krum, was also under the control of Voldemort, and was forced to participate in the tournament as part of the same plan to bring Harry to the Dark Lord.
Overall, the mystery of who put Harry’s name in the goblet serves as a key plot point in “Goblet of Fire,” ultimately leading to the reveal of the true identity of Peter Pettigrew and the machinations of Lord Voldemort’s plan to defeat Harry.