Hogwarts Castle is a large, seven-storey high building supported by magic, with a hundred and forty two staircases throughout its many towers and turrets and very deep dungeons. The castle was built in the late Early Middle Ages (c. 993) by a wizard architect and the four most celebrated wizards of the age: Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw and Salazar Slytherin. The Castle houses Hogwarts School of Witchcraft and Wizardry, regarded as the finest wizarding school in the world. Hogwarts is built in a valley area — surrounding mountains are part of the landscape — with the fairly large Great Lake to the south of the main building. The huge main oak front doors leading into the Entrance Hall face the west, and open up to sloping lawns. The deep Forbidden Forest extends around to the west of the Castle. There are also exterior greenhouses and vegetable patches on the school grounds.
Hogwarts is located in the Scottish Highlands, near the all-wizard village of Hogsmeade and "not far" from Dufftown, in Banffshire, and Achintee, in Lochaber.
It was the setting of the final battle of the Second Wizarding War, the Battle of Hogwarts, which resulted in the deaths of several witches and wizards who fought in defense of the castle, including Remus Lupin, Nymphadora Tonks, Fred Weasley, Colin Creevey, Lavender Brown, and Severus Snape. The castle was slightly damaged, but ultimately the Order of the Phoenix won when Harry Potter defeated his nemesis, Lord Voldemort, in the Great Hall.