Hogwarts is a fictional setting from the Harry Potter Universe.
 BackgroundHogwarts was created by the four original founders, Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw and Salazar Slytherin. Their idea was to create a school where the young witches and wizards between the ages of eleven and seventeen could be educated in magical arts. The school castle has multiple protection spells surrounding it. These spells help to keep the students safe. The spells mentioned that we know of are the anti-Apparation spell, which keeps people from Apparating into the school, and Muggle-repelling Charms. The Muggle-Repelling Charm works in a manner as to make any Muggles that come near the Hogwarts boundaries see an old, run-down ruin of a castle with a 'Danger, Keep out' sign. These spells can be removed by the Headmaster if it is felt it is in the school's best interests to. Due to the amount of magical energy flying around the school, many Muggle objects and devices do not work, although in Harry Potter and the Chamber of Secrets Colin Creevey has a working Muggle camera, however it was not specified to be electric or not.
 Early History
A small while after creating the school a rift appeared between the founders, mainly Salazar and the other three founders. Salazar believed that only pure-bloods should be allowed to learn at Hogwarts, but the others disagreed. This issue caused Salazar to leave Hogwarts, and end his friendship with Godric, starting the rivalry between the two houses. Before leaving, Salazar secretly built a chamber, known as the Chamber of Secrets under the school, unknown to the others. He decided that only when his true heir returned to the school, they would be able to open the Chamber of Secrets and continue his dream of a pure-blood descent only school. Within the Chamber, he had left a Basilisk for the heir to control, and be able to petrify, any student they wanted to.
 Middle History
A small while after the school was created, they entered into the Triwizard Tournament, a competition between the three biggest magical schools in Europe, Hogwarts, Durmstrang and Beauxbatons. The Tournament continued for centuries, with many deaths. When the death toll became too high, however, the contest was abandoned for safety reasons. The Triwizard Tournament returned in Harry's fourth year at Hogwarts, and carried on every four years.
 Later History
The Chamber of Secrets was opened twice since Salazar created it, one time being during the time that Tom Riddle was at the school. The boy had opened the Chamber using Parseltongue, and the Basilisk had reigned free around the school. After Myrtle, a young Muggle-born witch, was killed, the Ministry made threats to close the school if the terror continued. Since Riddle did not want the school to be closed as he would have to return to a Muggle orphanage, he framed Rubeus Hagrid for opening the Chamber of Secrets, and then shut it again himself. Fifty years after this incident, Ginny Weasley opened the Chamber again after being possessed by a memory of Riddle in a diary, allowing him to open the Chamber again by using her, and then the Basilisk could go round the school and try to kill people as Tom Riddle was controlling it, and telling it what to do.
At the end of the Deathly Hallows, Harry Potter returned to Hogwarts to find one of Voldemort's horcruxes, Rowena Ravenclaw's Lost Diadem. This brought Voldemort and his followers to attack the school, thus starting the Battle of Hogwarts, the final battle of the Second Wizarding War. Voldemort was eventually defeated, though much of Hogwarts was damaged or destroyed during the battle. Most of the school remained intact, however, so it continued to be the place of magical education in Britain.
Main Page: Gryffindor
Its emblem is a lion with its colours being scarlet and gold. The Head of House during Harry's time at Hogwarts was Minerva McGonagall. The House ghost for Gryffindor is Nearly Headless Nick. Gryffindors pride themselves on courage and chivalry. The common room can be located behind the picture of the Fat Lady on the seventh floor of Gryffindor Tower, to whom Gryffindor students must say the correct entrance to gain entry.
Main Page: Slytherin
Its emblem is a snake, and its colours are green and silver. The Head of House during Harry's time at Hogwarts was Severus Snape and then later Horace Slughorn. The House ghost is The Bloody Baron. Slytherin pride themselves on ambition, cunning, determination, resourcefulness, and self-preservation. The common room is accessed through the dungeons of the castle underneath the lake.
Main Page: Ravenclaw
Its emblem is an eagle, and its colours are blue and bronze. The Head of House during Harry's time at Hogwarts was Filius Flitwick. The House ghost is the Grey Lady. Ravenclaws pride themselves on intelligence and wit. The common room is located in one of the castle's towers. To enter, Ravenclaw students must solve a riddle given by a knocker shaped like a bronze eagle.
Main Page: Hufflepuff
Its emblem is a badger, and its colours are yellow and black. The Head of House during Harry's time at Hogwarts was Pomona Sprout. The House ghost for Hufflepuff is the Fat Friar. Hufflepuffs pride themselves on loyalty, dedication, and hard work. The common room is accessed through a painting located near the kitchens.