An engraving of the siege of La Fere. The town is in the center, surrounded by its own walls, and further out, the earthworks of the besiegers, who had to fortify themselves against any relieving forces. These earthworks are studded with the characteristic star-shaped fortification that is the best defense against cannon. At the top of the map is the camp of the king, which is surrounded by a ditch and also fortified. Amazingly enough, some of the seige trenches and fortifications of the 16th century are still visible in satellite photos of the region.
Usually when a besieging army breached the walls, a town was asked to surrender. If they did, the defenders could usually leave on satisfactory terms. If the town had to be taken by assault, neither the garrison nor the citizens could expect any mercy. By tradition, the sack of a town took 3 days: one to loot, one to carry off the loot, and one to negotiate the ransoms. It was a sign of Henri IV's solicitude for the common people that he only allowed his soldiers one day to sack a captured town.
Fortifications underwent a drastic change in the 16th century because of the development of cannon. Medieval walls provided their best protection when they were high, to prevent escalades. When the French dragged all their cannon into Italy in 1494, they brought those walls down like they were made of children's blocks. The new fortificiations against artillery are low, slanted, and wide, backed by earth to absorb cannon-shot. They are punctuated with very angular bastions, which allow the defenders to mount cannon and arquebusiers to provide intersecting covering fire in front of the walls. The walls themselves are surrounded by a glacis -- a wide, low, rising slope. Between the glacis and the main wall was a trench, and both the glacis and wall were backed with banked earth and stoneworks. When the Huguenots took possession of a town as a "place de sureté," they were experts are throwing up "fortifications à la Huguenotte" around its old medieval walls, digging trenches and building a glacis from the thrown-up earth. Some of these impromptu fortifications lasted quite a while.
Cannon had a profound effect on society, and are one of the factors that contributed to the development of the centralized state. Any feudal lord could build a high wall and stand off the king if he had a mind to do so. There was a fundamental equality of armament on all sides up until the 16th century (in a country like England where the primary weapons were "bills and bows", this equality even extended to the yeomen and cottagers). The founding of cannon is a terribly expensive business however, and was early on monopolized by the princes with the revenue, organization, and resources to do it on a large scale. Rebellious vassals were brought to heel, and the emerging nations tested their borders constantly, seeking their natural limits.