A siege is an armed attempt to capture a defended fortified position from an enemy, either through direct assault or by starving out the defenders. Which tactic was used depended on the strength of the defenses and the strength of the attacking force. If the attackers were of sufficient strength to completely cut off all resupply, the defenders would be dependant on stored provisions; in theory, if adequately supplied the defenders of a well-made castle could hold off the attackers indefinitely.
If there was no hope of starving out the defenders, then the attackers must either give up the attempt or try to breach the defenses. Assuming the siege would continue engineers would construct siege engines such as trebuchets, catapults and cats. Trenches could be dug or, if a moat was to be crossed, a mole constructed. Sapping and tunneling under the walls was also pursued, if practical. One particularly nasty sapper's trick was to undermine a section of wall with a large gallery supported by wooden posts, fill it with flammable material, and set it on fire. When the gallery collapsed, the section of wall would crumble, allowing the breach to be stormed.
Sieges were a standard of medieval warfare, owing to the widespread use of fortifications. In the ordinary run of medieval warfare the tradition of forty days' military service meant that most fortifications were not starved into submission, but rather stormed by force. In conflicts with non-Europeans, however, or during periods of great strife (such as the Hundred Year's War or the Crusades), prolonged sieges did occur. Some lasted for years.