It's a general call to action. The formation snaps to attention and the unit shouts out their branch's battle cry. It gets used as a general stand-in for regular words and the listener can often pick up context clues to infer what the word replaces. Soldiers can respond to most things with a simple "hooah" and their leader can assume they're saying either "yes," "no," "I don't really want to, but whatever," or "screw you," all from a single, guttural grunt. Though each branch's battle cry sounds similar, they different meanings and vastly different origins. Because there are no official records of the exact moment a word was first uttered, many of these have multiple origins. What follows are the most agreed upon.
Before we dive in, you'll probably notice that the Air Force doesn't really have one. Some civilian sites say that airmen use the Army's "Hooah" and most vets will joke that it's actually something silly like, "hip-hip-hooray!" To be honest, for all intents and purposes, the Air Force doesn't really need one. Besides, they've always been the ones to side-step military tradition in favor of modelling themselves after the civilian workforce.
Here is the history for each military branch's battle cry
"Hooah" — U.S. Army
There are many conflicting accounts of the origins of "Hooah." Some say that it originates from the Second Seminole War in 1841 when the peace agreement was made between the 2nd Dragoons and the Seminole Chief. The chief, who spoke little English, offered them a toast and said "Hough" — which was misinterpreted to mean "How d'ye do."
The term also has roots in the jump just before D-Day when General Cota, the 29th Division's commander, asked a 2nd Bat. Ranger where their commanding officer was. In response, the confused ranger shouted, "Who? Us?" The general could only hear "Hooah" through all the loud wind buzzing past them. Cota thought it was some cool Ranger saying and it kind of stuck.
But the most accepted origin is that it's simply the acronym for "Heard, Understood, Acknowledged."
"Oorah" — U.S. Marine Corps Battle Cry
Again, people offer all kinds of origin stories for the word, "oorah." Some say it's a butchering of the 16th century German word for "hurry." Other say it's an adaptation of the Turkish word for "kill." Others say it comes from WWII, when injured Marines were treated in northern Australia. There, they'd spend a lot of time around the locals as they healed. That part of Australia used, "Ohh, rah." as slang for "goodbye."
However, according to Marine Corps lore, it is credited to Former Sgt. Maj. of the Marine Corps John Massaro who imitated a submarine's dive siren of "Aarugha." He later became a drill instructor and used it with his recruits who then passed it on to the rest of the Corps.
The Navy's "hooyah" is the onomatopoeia for a siren going off. It's that loud, obnoxious "gaHooyuh" that sailors would hear before manning battle stations.
As much as conventional sailors have tried to hijack the saying in the 90s, it actually belonged to the SEALs, Navy EOD, and deep-sea divers at first — but mostly the SEALs. This still leads to some awkwardness from regular sailors who aren't sure if they're allowed to shout it or not.
Despite how most soldiers, airmen, and the occasional Marine think, "Hoorah" is more of a green-side Navy thing and not exactly a Marine thing — note the distinctive lack of an "H," as found in the standard Marines' version.
It's a mix of the Marine's "Oorah" and the sailor's "Hooyah" all rolled into one. It's a fitting battle cry seeing as how Seabees and Corpsman spend most of their time working side-by-side with Marines, but are still sailors. Some say it's an acronym for "heard, understood, recognized, and acknowledged," but this could also be a backronym, modeled after the Army's version.