Sapping is a term used in siege operations. Any trench excavated under defensive musket or artillery fire that was intended to advance a besieging army's position in relation to the works of an attacked fortification was referred to as a sap. Saps of approach were excavated by brigades of trained soldiers, often called sappers, because they dug the saps, or specifically instructed troops of the line.
By using the sap (trench) the besiegers could move closer to the walls of a fortress, without exposing the sappers to direct fire from the defending force. To protect the sappers, trenches were usually dug at an angle in zig-zagged pattern (to protect against enfilading fire from the defenders) and at the head of the sap a defensive shield made of gabions (or a mantlet) could be deployed.
Once the saps were close enough, siege engines or cannons could be deployed to batter a breach in the curtain walls. Prior to the invention of large pieces of siege artillery, miners could start to tunnel from the head of a sap to undermine the walls. A fire or gunpowder would then be used to create a crater into which a section of the fortifications would fall creating a breach.[1]