As you might imagine, soldiers can't just use garden variety earplugs to protect their ears. It might tone down the sounds of explosions and gunshots, but it'll also prevent them from hearing a crucial command or an enemy on the other side of a doorway. It's less of an issue for the US Army these days, though. The military branch has been gradually rolling out a smart earplug, TCAPS (Tactical Communication and Protective System), that adapts to the audio realities of war. The smartphone-linked device softens louder noises, but amplifies quieter ones; if your squad leader needs to issue a command, you'll hear it over the din of battle.
It's a relatively simple system, but it's very flexible. Some versions link to a soldier's existing communications, and it'll play nicely with hearing aids.
TCAPS is far from ubiquitous. Only 20,000 of the earplugs are in the field, and it's doubtful that every single person in the infantry will get one when they cost around $2,000 a pop. However, it stands a relatively good shot of catching on. More than anything, the technology provides confidence -- you know you'll get crucial audio cues without going deaf.