referencing when possible (This is not my strength; I do not like to go through books looking for sources. Help appreciated. Just make sure you check with me, at my talk page)
The Room of Requirement is a secret room in Hogwarts that only appears when a person is in great need of it. The room then transforms itself into whatever the witch or wizard needs it to be at that moment, although there are some limitations. For example, it cannot create food, as that is one of the five Principal Exceptions to Gamp's Law of Elemental Transfiguration. [1] It is believed that the room is Unplottable, as it does not appear on the Marauder's Map, nor do its occupants, although this could simply be because James Potter, Remus Lupin, Sirius Black, and Peter Pettigrew never found the room.
The room is located on the seventh floor of Hogwarts castle, and has a hidden entrance opposite the tapestry depicting the attempt of Barnabas the Barmy to teach trolls ballet. To enter the room, you must walk past it three times thinking about what you need. A door will appear, which leads to the room, furnished to take care of your needs. [2]
It is advised that the users of this room be very specific about what they are looking for, as it has been shown that other people can enter the room and see what the occupant is doing if they know how the room is being used. The Inquisitorial Squad found the hideout of the D.A. in 1996 when they found out that the D.A. was in the room at the time, and knew how to get in, due to Marietta Edgecombe telling Dolores Umbridge. [3]Neville Longbottom used this knowledge to create his hideout, as he specifically asked that the hideout be made unavailable to those who supported the Carrows. [1]
The first mention of this room was in 1994, when Albus Dumbledore told Igor Karkaroff of his discovery of a room full of chamber pots when he needed to go to the toilet. However, he was unable to find the room again later. [2]
Hermione Granger: "You've done it, Neville! You've found the Room of Requirement... It's also known as the Come and Go Room. It can only be used by someone who really needs it. And it's always equipped for the seeker's needs."
Ron Weasley: "Right. Say you really needed the toilet?"
Hermione Granger: "Charming, Ronald. But yes."
— Hermione to D.A. on their first meeting in 1995[src]
In 1995, Harry Potter asked Dobby if he knew of a place where Dumbledore's Army could safely meet. Dobby told Harry of what the house-elves called the "Come and Go Room", or "Room of Requirement."
During the first D.A. meeting, Fred and George Weasley revealed that it had once taken the form of a broom cupboard which they had used to hide from Filch. [2]
When Dobby was in need of a place to care for Winky after she had gotten drunk on Butterbeer, he found this room perfectly suited for his needs. The room was filled with antidotes to butterbeer and an elf-sized bed for Winky to sleep off her inebriation. [2]
Harry used this room again in his sixth year to hide his copy of the Half-Blood Prince's Potions textbook from Professor Snape. He found that many other students from past years had used the room to hide a multitude of objects, including the Vanishing Cabinet. Inside the cabinet in which he hid the book, Harry found a cage that contained the skeleton of something that had 5 legs.
Also in Harry's sixth year, Professor Trelawney attempted to use the room to hide her sherry bottles, but Draco Malfoy threw her out. Draco was using the room to repair the Vanishing Cabinet so he could smuggle Death Eaters into the castle via a matching Vanishing Cabinet in Borgin and Burkes.
Harry also shared his first kiss with Ginny Weasley in this room.
Later that same year, during the Battle of Hogwarts, it was used as an evacuation route to move the students away from the dangers that followed. Later, Harry realised that Rowena Ravenclaw's Diadem, one of Voldemort's Horcruxes, was hidden in the Room of Hidden Things, as he has seen it in his sixth year while hiding his Potions book and had even picked it up without realizing what it was. He, Hermione and Ron managed to find it, but were ambushed by Draco Malfoy, Vincent Crabbe and Gregory Goyle. Crabbe let loose cursed fire that destroyed the Horcrux and many other objects, killing himself in the process.
In the sixth film, Harry and Ginny had their first kiss in the Room of Hidden Things, instead of the Gryffindor common room.
In the eighth film, Gregory Goyle casts the Fiendfyre curse in the Room of Hidden Things, destroying the diadem and killing himself in the process, since Vincent Crabbe was cut from the two-part film.