Once the German advance was halted, neither side could seriously advance for two years. This seems like an extraordinarily long time. Why didn't anyone succeed at going around the trenches or striking through?
As Shmuel Brill points out, there really wasn't a way around the trenches, the only choice was through, and that was a tough proposition. We're talking about ground troops who do not have significant body armor other than a helmet, armed primarily with bolt action rifles and bayonets, advancing on foot over significant distances of open ground against heavily fortified installations. While they advance they are supremely vulnerable to artillery fire and machinegun fire. They are also vulnerable to sniper and rifle fire from any of the defending soldiers, who have the ability to pick their shots. If they survive that then they have to deal with the barbed wire and other obstacles protecting the enemy trenches. And if they survive that then the real battle begins in the trenches. A battle where the attackers are yet again at a disadvantage.
At each step the attackers are at extreme disadvantage, and at each step the attackers will have their numbers cut down until any remnant forces that manage to make it to the defending trenches are so numerically disadvantaged that they are easily defeated.
Now, once those conditions begin to dominate then there are second order effects. You are not going to attack willy nilly overly much because it'll just result in slaughter, so you wait for the right time. You wait until your artillery has pounded the enemy positions a great deal. You wait until, perhaps, you have sufficient reinforcements to give your side the benefit of numbers. You wait until whatever disease has been cutting down your troops has passed and you are back to a level of strength where it's reasonable to attack. So there's a lot more waiting as well. But even so, the waiting doesn't help because the odds are so heavily stacked against offensive actions that you'd need an overwhelming advantage to break through the enemy lines. Acquiring enough ground troops for such an advantage would simply have the effect of diluting the defenses elsewhere.
It's only once technological advances and new tactics are developed that it became possible to break that stalemate. However, once broken the remainder of the war proceeded rather rapidly.
- There were trenches from the sea to Switzerland. There was no way to outflank them.
- Tanks (as well as cars) were invented not long before the war, and were impractical until 1916. Without tanks, there was no way to break through clear ground protected by entrenched machine gunners.
Fairly early in the war techniques and tactics were developed that meant trench systems could be successfully assaulted and many offensives were initially successful. They relied on large amounts of artillery support. While machine guns, trenches, the wire made attacking difficult, sufficient prepared assaults were generally successful.
The Problems of successful exploiting a successful assault were vast. The Lack of communications over no mans land to the successful troops prevented accurate knowledge of their positions and what was happening, and without that knowledge is was hard to provide artillery support, or know when to reinforce or resupply.
On top of that the range of most of the artillery meant that once advanced significantly the attacking troops were outside the range of supporting guns, (and even when in range lack of reliable observation of targets made it less effective)
Bringing supplies, reinforcement and artillery over no man's land up to support, consolidate and attack further was very hard. The land was generally very churned up and often in range of enemy guns.
Conversely the defender,he normally had much better information about the attacking troops location, the attacking troops and it's supply line was definitely in range of the defenders guns, the defenders communications generally were intact (buried wires), and his reinforcements could arrive along railways or roads quickly from other areas.
Allied successful tactics, normally involved 'bite and hold' or similar, purposefully shallow attacks to keep the attackers in range of supporting artillery.