In medieval times, moats were an effective defense strategy against attacks from hostile invaders. To construct a moat, a trench had to be dug around the castle. This trench was filled with water from a diverted source. Having a moat surrounding a castle served to slow down invaders giving the owners of a castle the opportunity to counter an attack. Crossing the moat would require an invading force to place makeshift bridges to cross the wet area. Bridges were limited in number, this meant that the attackers could not run over the moors in hordes and overwhelm the castle’s defenses.
The castle walls were built as massive structures towering over the moors. From the vantage point, archers could fire arrows at the invaders. Moats were built to slow down the invading force, giving archers ample time to rain their arrows on them. An archer positioned at the top of a wall is less likely to get hit by assault from the ground. The higher vantage point gave archers an easy target, it was easy scouting weaknesses in their shields. While the moats served as a distraction, archers were aiming at invaders and getting more supplies for their quivers.
Before moats were invented as a defensive strategy, invaders could dig tunnels that ran into a castle compromising defenses. Moats solved this problem by creating a region which could not be passed by digging under. A tunnel would lead straight into the water-filled trench making it impossible to pass unnoticed. Tunnels cannot be dug below a moat because of the structural integrity of tunnels. When a tunnel is dug in wet soil, it is likely to collapse due to a lack of proper reinforcement. Digging moats effectively barred all attacks from digging tunnels, leaving a defending army focusing on approaching ground forces.
When constructing moats, ruthless engineers were employed, making them a dangerous stretch to navigate. Spikes were dug into moats, since these spikes were buried under murky waters it was hard figuring out where they were positioned. If you run blindly into a moat, you risk being impaled on these spikes. In the scenario a makeshift bridge collapsed, attackers would often fall on these spikes. The dangerous nature of crossing a moat made it an effective buffer zone that slowed down an attack. Metal spikes were used because wooden stakes tend to rot underwater and would not work as effectively.
A more barbaric strategy in designing a moat involved introducing alligators to their water. The alligators and crocodiles that lived in moats were rarely fed. This made them very ferocious and deadly predators capable of eating, if not tearing limbs from attackers. By tweaking nature to work in their favor, early designers of moats fused this savage detail in making a moat. The possibility that there might be alligators in the moat was a scary thought by itself and greatly discouraged an attacker from jumping into the moat. In addition to alligators and crocodiles, water snakes were also kept in moats as a defensive stand.
Oil tends to float on water, this was a powerful trick in the medieval period. By pouring barrels of oil into the moat, you had a medieval bomb in your hand. Firing a flaming arrow into the oil would ignite it surrounding a castle with a wall of fire. The oil in the ignition burns, furiously obstructing all attackers with fiery orange flames and columns of smoke. It is hard to race past fire and this stalls an attack until the castle defenders run out of oil or the weather turns on them. Lighting up the moat was a last resort strategy that indicated the defenses were significantly weaker.
If a moat was breached, it offered a final advantage in the sense that an attacking force was limited to carrying light weapons. The makeshift bridges were not built to hold heavy weights, which limited what weapons were to be used in the siege. Heavy cannons were fired distantly since it was impossible to carry them past the moats. Fewer weapons met defenders who still stood a chance if their defenses were breached. In one instance an attacker chose to swim across a moat he was limited to carry light weapons because heavy weapons made it impossible to swim.