Hogwarts was founded over a thousand years ago - the precise date is uncertain - by the four greatest wizards of the age. The four school houses are named after them: Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw, and Salazar Slytherin. They built this castle together, far from prying Muggle eyes, for it was an age when magic was feared by common people and witches and wizards suffered much persecution. For a few years, the founders worked in harmony together, seeking out youngsters who showed signs of magic and bringing them up to the castle to be educated.
The are four Houses in Hogwarts: Gryffindor, Slytherin, Ravenclaw, and Hufflepuff. Children with magical abilities are placed to them according to their abilities. Gryffindor house, headed by Professor McGonagall, values courage, loyalty, and chivalry. It's symbol is lion. Slytherin, headed by Severus Snape, values ambition, cunning, determination and blood purity. It's symbol is snake. Ravenclaw, headed by Filius Flitwick, values intelligence, creativity, and wit. It's symbol is eagle. Finally, Hufflepuff, headed by Pomona Sprout, values loyalty, kindness and hard work. It's symbol is badger.
Students of Hogwarts attend various classes, such as Charms, Defence Against the Dark Arts, History of Magic, and etc. They learn not only spells, but also how to brew potions, predict the future, read the ancient runes, and fly the broomsticks among other things.
Location of Hogwarts
J. K. Rowling says she visualises Hogwarts, in its entirety, to be
"a huge, rambling, quite scary-looking castle, with a jumble of towers and battlements. It isn't a building that Muggles could build, because it is supported by magic."
Hogwarts is located in a mountainous and secluded region in Scotland, near a fictional wizarding village called Hogsmeade. The castle has extensive grounds with sloping lawns, flower beds and vegetable patches, a loch, a large and dense forest (called the Forbidden Forest because of the dangerous creatures living there), a number of greenhouses and other outbuildings, and a full-size Quidditch pitch.
There is also an Owlery, which houses all of the owls owned by the school and those owned by students. The castle is surrounded by mountains. It has a network of protective charms and magical barriers.
The school is enchanted to repel Muggles (non-magical people), to whom Hogwarts appears to be "a mouldering old ruin with a sign over the entrance saying DANGER, DO NOT ENTER, UNSAFE". Electronic devices go haywire and do not work around Hogwarts because there is too much magic in the air.