They were designed to be difficult to attack and easy to defend. Castles protected owners from rivals and invaders; however, castles were also used to protect the local citizens. Early castles were built in the 9th and 10th centuries and were constructed of earth and wood; usually constructed on higher ground.