The literal universe of Harry Potter is a wash with deep and well organised characters that truly make the seven book eight film series whizz along at a great pace. They all play an important part in telling the tale of Harry’s struggles against Lord Voldemort along with the general battles that one has with puberty let alone finding out that you are a Wizard. However the sum of a story is also made up and supported by it’s locations and with Hogwarts School for Witchcraft and Wizardry we have one of the strongest their has ever been. J K Rowling has been able to create a magical castle that seems to be a character in its own right.
There are many parts of the castle that fulfil this role be it the Quidditch pitch to the Gryffindor tower. There is one part of the castle that seems to play a pivotal role in events in two of the books and that is the Whomping Willow. Despite being told not to go near it the students Harry, Hermione and Ron all seem to ignore this. It also seems that previous students such as Ron’s older Brothers George and Fred misheard the advice and so did Harry’s Dad, Sirius Black and Remus Lupin when they were finding and creating their tunnels as Padfot, Moony and Prongs.
In reality the Willow on screen is computer generated but for the live action scenes a hydralic system is used similar to that of a hydraulic winch supplied by https://www.brevini.co.uk/power-transmission/winches/.
We first meet the Willow when Ron drives the Family’s enchanted Ford Anglia into it at the start of the second term. Naturally the Willow takes great offence to this and immediately starts beating up the car which subsequently chucks Harry and Ron plus Suitcases out onto the lawn and then escapes into the Forbidden Forest. They are caught by Professor Snape who gives them detention for damaging a rare Whomping Willow. The second time we see the Willow in action is when the children need to subdue it so that they can follow Scabbers the rat in the Prisoner of Azkaban. The Rat is really the traitor Peter Pettigrew and as the Willow sleeps they are able to sneak past it without getting a whomped. In the film version of the book the Willow is also used to show the changing of the seasons as it quickly drops its leaves for autumn then casually backhands a squirrel that annoys it whilst looking to hide its nuts.