A castle is a defensive structure built in a prominent position.
The Romans used fortifications which varied from simple temporary earthworks thrown up by armies on the move, to elaborate permanent stone constructions, notably the mile castles of Hadrian's Wall. Roman forts were generally rectangular with rounded corners. The Roman engineer Vitruvius was the first to note the three main advantages of round corner towers: more efficient use of stone, improved defence against battering rams and improved field of fire.
After the Romans, a few castles were built, but really were fortified manor houses. After the Norman invasion in 1066, the castle became the main form of defence. Built to control the land of mainly a Saxon population, the Normans being out numbered.
Motte and Bailey style of castle were constructed by digging a deep circular ditch and piling up the earth taken from the ditch into the centre. That became the motte. Heights of these mottes varied from 10 feet to 100 feet and there base diameters from 100 to 300 feet. Motte shapes could vary, they could be round, oval, or even angular. Generally, mottes were topped with a wooden tower which was used as a look-out and an elevated fighting point. Often times, the tower provided accommodation for the lord of the castle. Nearly all villages had a motte and bailey castle to guard them, mostly what you see today is just a tree covered mound.
Stone castles were built for stability and to symbolize the power of the lords of the kingdom. Most were built up from existing motte and bailey castles. These castles, even from the earliest times, followed certain standards of design and construction. Generally, the central feature of the castle was the keep, the main commanding tower. The primary function of the keep varied, but usually it was a residential structure functioning as a redoubt in times of trouble, but could also be used as a secure storage area, later, as a prison. The keep was contained within the walls or attached to the walls. The area outlined by the walls was known as the bailey or the court, and the enclosure known as the enceinte or curtain walls.
In the end, the introduction of gunpowder led to a disappearing of traditional castles, in the meaning of a building intended for both military and residential roles. This transition began in the 14th century and was fully underway by the 15th. In the 16th century the feudal fastness had become an anachronism. Normally castles, when they were no longer needed to fell into ruins, became peaceful mansions, or were merged in the fortifications of the town which has grown up around it.
Over time the aesthetics of the design increased in importance, as the appearance and size began to reflect the prestige and power of the occupant. Often over time comfortable homes evolved within the fortified walls. Castle comes from the Latin word castellum, which means 'fortified place'.