Moat
A moat is a deep, broad ditch dug around a castle, fortification, building or garrisoned town, either dry or filled with water, historically to provide the site with a preliminary line of defence, particularly against siege engines. Moats typically deny all direct land access except at a few narrow locations traversed by drawbridges, bridges or causeways, into which a siege will be funneled and thus easier to defend against.
Read on Wikipedia