A castle is a type of fortified structure built during the Middle Ages predominantly by the nobility or royalty and by military orders. Scholars usually consider a castle to be the private fortified residence of a lord or noble. This is distinct from a mansion, palace and villa, whose main purpose was exclusively for pleasance and are not primarily fortresses but may be fortified. Use of the term has varied over time and, sometimes, has also been applied to structures such as hill forts and 19th- and 20th-century homes built to resemble castles. Over the Middle Ages, when genuine castles were built, they took on a great many forms with many different features, although some, such as curtain walls, arrowslits, and portcullises, were commonplace.
Dating back to the early 12th century, the Alcázar of Segovia, Spain, is one of the most distinctive castles in Europe.
Built in 1385, Bodiam Castle in East Sussex, England, is surrounded by a water-filled moat
The Norman White Tower, the keep of the Tower of London, exemplifies all uses of a castle including city defence, a residence, and a place of refuge in times of crisis.
Windsor Castle in England was founded as a fortification during the Norman Conquest and was one of the principal official residences of Queen Elizabeth II during her reign.
A defensive wall is a fortification usually used to protect a city, town or other settlement from potential aggressors. The walls can range from simple palisades or earthworks to extensive military fortifications with towers, bastions and gates for access to the city. From ancient to modern times, they were used to enclose settlements. Generally, these are referred to as city walls or town walls, although there were also walls, such as the Great Wall of China, Walls of Benin, Hadrian's Wall, Anastasian Wall, and the Atlantic Wall, which extended far beyond the borders of a city and were used to enclose regions or mark territorial boundaries. In mountainous terrain, defensive walls such as letzis were used in combination with castles to seal valleys from potential attack. Beyond their defensive utility, many walls also had important symbolic functions – representing the status and independence of the communities they embraced.
9th century BC relief of an Assyrian attack on a walled town
The lakeside wall of the Yueyang Tower, Yuan dynasty
Medieval defensive walls and towers in Szprotawa, Poland, made of field stone and bog iron
Dangjin-myeoncheon-eupseong (唐津沔川邑城)