A moat is a body of water around a castle or town to keep people out. At first, moats were simple and used only for protection. Later on, moats became more complicated and were used for show.
Moats are deep, wide ditches filled with water. They were usually built near sources of water that flowed into the moats, filling them with water. The moats were filled with water for a few reasons. It made enemies swimming across the moat easy targets. It also made it impossible for enemies to dig underneath the castle walls, which was a common method of attack. It also prevented fires from destroying the castle.