Beware the Rascal.
The two worlds, muggle and magical, have not always been so separate as they are today, hence the similarities that still exist. In the medieval times it was common place to have families of witches and wizards distributed throughout villages and towns, after all they came in useful, as long as they weren't too many, then it was just suspicious. But then politics decided it wanted to dabble, after all, fear is an easy way to get into power, and ... well, it was almost too easy to make witchcraft seem the source of all evil. It was mysterious and there didn't seem to be an obvious cause, must be the work of the devil... and, because people didn't want to become targets themselves, they happily (or rather unhappily but with very little guilt if it meant saving their families) turned over their neighbours in the hope that they would be be spared!
And so four founders got together and built a defence which wouldn't look out of place but would protect its inhabitants. Magical children were taken in regardless of creed or birth in order to protect, but as the threat became less, parents had a choice of whether to send their children to learn, teaching children how to defend themselves became less important, and so, a school developed. As time progressed and muggle technology advanced, the castle still stood but enchantments were added to act as an extra defence against the curiosity, jealously and maliciousness of muggles, making it seem dilapidated and too dangerous to enter.
This is the tale of how Hogwarts reverted back to its original purpose, but this time against its own people, those that it protected and nurtured who turned against their own kind. This is a tale akin to Arthur and Merlin, but instead of a muggle and a wizard, it involves a half-blood prince, called Severus and a muggle by the name of Siegfried, standing together in the shadows of the world to restore the balance.
