Trenches were very easy to defend and very hard to attack. So once a trench was dug, and another one of the enemy's next to it, it would be very hard to change the status quo: neither side would want to be the one attacking the other one's trench, as they would be very likely to die.
so it was a way of "stalemate"