I agree with moonhunter on what brings about trenches.
Now, what could bring them about would be some type of magical constructs which were analogs to Artilley/Machineguns, such as Lightning Spires (Similar to what existed in Red Alert). In this case, we are creating a situation where defence is more powerful then offense, and so stalemate ensues.
A nation with powerful magic users created a network of lightning shooting spires on their border with another kingdom. Since any who tried crossing over land to attack were fried, their enemies built trenches to get closer to the towers, with the intent to eventually tunnel underneath them to collapse the towers and create a breach. Perhaps both nations constructed similar spires and created a no-mans land between. The spires would of course be built far enough apart not to be able to strike each other (otherwise it would be rather difficult to build them.)
The spires would have to outrange all other forms of magical attack for this to work, and would be a very high magic world.
This status quo would exist until spires are destroyed (subterfuge, etc), or a mobile, lightning resistent attack form is developed (ceramic golems, anyone? :) ) Go to Comment