As the trenches were dug to protect those within them they also inflicted lack of forward movement and aggressive actions that were later employed in World War 2 (Blitzkrieg, a British innovation ulitised to great effect by the German Army (Das Heer)). To promote action from the trenches and end the seeming stalemate all sides developed and employed new weaponary. Poison Gas was first used by the Germans in 1915, the Tank was employed as a means of crossing the trenches, best exemplified by the British Male and Female vehicles, thus promoting aggressive gains, ariel bombardment was developed steadily over the period, and advances in the use and effectiveness of Artillery also profilerated.
The Trench systems themselves were never long straight lines, they incorporated zig zags, communication trench, fire positions for Machine Guns and deeply dug shelters, which in the case of the Germans were often concrete lined. It must be pointed out that the German Trench systems were often better made and designed that those of the British and French armies.
Trenches were often expanded forwards by occupying shell craters close to friendly lines and digging both toward the crater from the trenches, a dangerous task indeed. When opposing trench systems were often close together mines were sunk underneath the opposing trench by military engineers ( referred to as "Clay Kickers" in the British Army of the time) then when the mine was directly underneath the enemy positions explosives were detonated in a co-ordinated attack by overland infantry to seize that particular part of the trench system.
During WW2 the British and French Armies did start to built some quite complex trench systems, but the Blitzkrieg in the west soon rendered them useless. However on the Eastern front both sides used trench systems to provide shelter during the winter periods and in siege situations such as in the Leningrad (St Petersberg) and Stalingrad (Volgorod) battles. Often these trenches were built as part of a redoudt and mirrored Great War models of trench design. However once the spring thaw set in they were often vacated as the front became more fluid, and armoured warfare became a more viable method of persecuting offensive action.
In modern warfare trench warfare is now deemed void with development of the All Arms Battle Group. The best example of this overcoming of the Trench can be seem in the Gulf War of 1991. Iraqi forces dug vast trench systems only to have them either quickly out flanked by UN armour or Combat Engineers merely ploughed the parapets back onto the defenders, thus burying them.
That said smaller 2 - 4 man trenches are still dug. These are used to provide observation posts for Forward Artillery Observers, or to provide protection in a Nuclear, Chemical or Biological environment. Quick trenches can be dug by Combat Engineers using a variety of plant to provide shelter for fixed point defenses, such as around key point installations, airfields or company sized ops such as those in Afghanistan at present. These are designed to provide cover from small arms and artillery fire, and rarely for occupation over a long period of time. As such Trenches are now used for purely defensive positions.
Hope this helps.