Trench warfare happened because of new weapons in the war. Machine guns, artillery, and barbed wire made old ways of fighting useless. So, soldiers dug trenches to stay safe. These trenches started as simple tunnels and eventually became complex networks of trenches.
Living in the trenches was rough. Soldiers were stuck in small, dirty spaces with mud, rats, and sickness all around. They did the same things every day, like standing guard and fixing things, with the constant fear of attacks.