For centuries defensive fortifications were built. Defenders would dig a ditch piling up the dirt they had removed to build a mound behind the ditch. A timber wall was then built on the mound. Sharp stakes were then placed in the ditch. Defenders standing behind the wall could then throw spears and shoot arrows at the attackers as they picked their way through the stakes, climbed up out of the ditch and over the wall.
Castles were an extension of this defence. The first castles consisted of a high mound of earth topped with a tower surrounded by a wooden wall. This tower served as a residence for the lord and his family as well as a lookout post for the surrounding land. On a lower level was another area surrounded by a ditch and wall. This safe area housed the stables, livestock pens, blacksmith shop, workshops, outdoor kitchen and gardens.
These early castles were wooden constructions that did not weather well and could easily be burnt down. As each new method of attack was experienced a new method of defence was developed. Stone replaced wood as the major building material, walls became taller and thicker, towers changed from square to a round shape and moats were developed.
Wealth, available resources and challenging locations ensured that castles were all different however they all contained the same fundamental features.