A siege is when an army waits out a castle. The army would wait until the people that took refuge inside the castle would run out food and water. They would do this until the people inside the castle would surrender. They would also throw dead and diseased animals over the wall, so the people inside the castle would get sick and die. It would last for months even years. The reason for a siege was to gain land and more power.
The link: https://www.flickr.com/photos/136041510@N05/22321190318/in/photostream/
A moat was used to defend a castle during a war in the middle ages. People that lived in the castle would fill the moats with human waste. They would do this because the enemies that were trying to get inside would have to wade through the water. The moat was also used to stop attackers from digging mines under the castle wall and blowing up the foundation of the castle, it would also prevent the attackers from using a battering-ram against the castle door. In some cases they would even build their castle on an island in the middle of a lake.