In Medieval Europe, castles acted as both home and military stronghold. They were occupied by a lord, his family,servants and sometimes an army of professional soldiers. They provided refuge for local people in times of war. Local Lords could control the surrounding land from their castles, hence they were important part of feudalism. Castles were built to be defended, with walls strong enough to keep out an enemy, while allowing the occupants to shoot at any attackers. Designs changed as builders invented better methods of defense or adopted new ideas for castles in Islamic world.
The Normans erect wooden motte-and-bailley castles during the conquest of inland, these are quick to build and motte or the tower on top of the mound and is easy to defend. In 1142 krak des chevaliers built syria, one of the most easy to defend crusade castles has concentric stonewalls. The muslim rulers of medieval spain built the castle palace of Alhambra.
In 1600 many castles were built by local lords in Japan. Like Himeji.