Location from harry-potter-philosophers-stone by
A vast library of thousands of books on every magical subject, fiercely guarded by Madam Pince, with a Restricted Section roped off for dangerous texts that scream when opened without permission.
The Hogwarts Library is where the trio's detective work happens. The search for Nicolas Flamel — who is he, why did Hagrid mention him, what is the three-headed dog guarding? — drives Hermione to tear through every book in the library for weeks. She finally finds the answer on a Chocolate Frog card Harry had thrown aside on the train: Flamel is Dumbledore's partner in alchemy, and the Philosopher's Stone is what Fluffy is guarding. Harry also visited the Restricted Section under his new Invisibility Cloak, looking for information about the Stone. A book screamed when he opened it, Filch came running, and Harry barely escaped — stumbling into the room with the Mirror of Erised. The library is Hermione's natural habitat and the place where most of the book's mystery unravels.
Thousands of shelves in towering rows, lit by lamps on each table. The Restricted Section is behind a rope at the back, its books occasionally moaning or snapping at browsers. Reading tables and chairs fill the central space. Madam Pince patrols the aisles, pouncing on anyone who mistreats a book or breathes too loudly.
Also known as: the Library, Hogwarts Library, the Restricted Section