A castle was a fortified nobleman's home. The largest castles were built by barons and kings.
Most British castles were built from the 11th century, when William the Conqueror brought over the European castle design after the Battle of Hastings in 1066.
Castle-building ended in the 15th century (the end of the age of the Wars of the Roses, just before Tudor times). This was because life was less dangerous, so a fortified home was no longer needed, such homes were uncomfortable, and because castles could not stand up to the newly-invented cannon fire.
Castles had many common features. The simplest early castles had just a single tower (keep) on an earth mound (motte) surrounded by a ditch (moat).
Over the centuries castles grew by adding an enclosing wall (a curtain wall). Many walls had a small escape door in the wall called a postern.
Castles built during and after the reign of King Edward I often had two parallel curtain walls and no central keep, but each large tower on the inner walls was a fortified house in its own right.