Castles were built mostly in the Middle Ages. They were built for defense, and whenever possible, were built near defensive land forms, such as a river or hill. The first castles were built of wood and placed on mounds. The idea was that you could make the castle quickly when the need arose. Often, ditches were built around the castles for added defense. These types of castles were called motte and bailey castles.
After the people figured out that weapons could be made of iron, the castle builders decided that their castles needed to be made of stone. Also, they made moats, ditches with water in them, to keep the intruders far enough from the castle so that archers could get at them from behind battlements on top of the walls and from the archer slits in the walls.
If you wanted to make a castle, the very first thing you would do would be to hire an engineer to design and supervise the building of your castle. Then, you would need to choose a location for the castle that has defensive properties, such as on a peninsula, on a hill, or by a river. The first people you would hire to help build your castle would probably be carpenters so that they could begin leveling the land and building a defensive ditch.
Castle plans were fairly simplistic. A VRML model of one is available here at our site. They generally had an inner and outer wall, with gates and towers. The gates usually had towers on either side, iron portcullises, heavy wooden doors, and often a drawbridge for crossing a moat. The towers were usually at the corners of the walls and contained living quarters for the master of the castle and his family. Below the towers, space for storage and a dungeon exists. One of the towers is usually different from the rest. The chapel tower contains a chapel for the castle population to pray in and have weddings and such.
In the middle of the castle, most of the castle functions take place. There is a Great Hall for feasts, parties, and receptions; the kitchen for cooking the meals; and living quarters for the servants.
With the invention of gunpowder and cannons, castles became obsolete. Their stone walls were easily blasted apart by flying cannon balls, and were soon abandoned. Castles were built all over Europe, and at least one exists in every European country today. The greatest number are in Britain, France, Spain, Switzerland, and Germany.