Castles first appeared in northern Europe in the tenth century, in a period of time also known as the medieval age.
The history of the Normans explains why castles came to England. In 1066 the Normans invaded England and, after defeating the ruling king, they started controlling they're new kingdom. They needed and wanted to show their authority and give punishment to rebellions that broke out across the country.
Types of castles
The earliest built castle was built in a large bit of earth, which could be known as high as a astonishing sixty- story house. A wall of earth and timber was used for a defensive barrier. At the end of the eleventh century people started using a new and stronger material for castles called stone, instead of weak wood.
Muslims castles and towns were also built out of bare rock, even cliff edges making the castle very hard to attack. The “Crusader” who were in the Middle East, were influenced by these designs and started
making they're own.
Motte and Bailey castle

On top here, is a motte and a bailey castle the top one over the hill is known as the motte castle and the bottom one is known as an bailey.
The Crusades thought Europeans rulers the military value of building more than one castle in a particular territory. With a group of castle, the soldiers inside them could support one another even if they were from a different castle they are right next to each other. This helps because if someone attacks the ownership and territory have the combined force of the group of castle to fight them out.