A large fortified self-contained community building, usually built of stone, popular in
medieval Europe.
The outer wall is called the Motte and the central tower is called the Bailey.
Various defensive capabilties were designed into the structure including drawbridges, portcullises, slotted windows for archery, and holes for pouring boiling oil.
Once the population is inside they're difficult to attack. Most successful attacks therefore relied on the element of surprise.