Very few castles had the advantage of access to fresh flowing natural water – for example formed by the loop of a river. Most of them had to be man-made.
A good way of creating a moat was by constructing a special dam to channel nearby rivers and streams. This would create a stagnant pool around the castle. With an average depth of about 30 feet, stagnant moats were as effective as “living” ones for preventing attackers and siege engines reach the castle walls. Moats also prevented attackers from tunnelling underneath the castle walls.
To overcome a moat, one method used was to create a makeshift bridge. Attackers could also sail a barge.