Several ways. Previously, and for a couple thousand years, two armies would meet on a field, and fight each other. The first to break lost. Even rifles did not really change that.
However, machine guns certainly did. They were used a bit in the Boer War, but, really came into their own in WWI. To deadly effect.
The other big change was civilian casualties. In Waterloo, and other older battles, people actually watched the fighting as spectators. In WWI, civilians died if they got in the way of the fighting, and in WWII, they were specifically targetted.