I have an odd fascination with the Civil War and the Battle of Gettysburg in particular. The 12,000 Rebel troops were said to have used the 'Rebel Yell' while advancing on the Union stronghold on the third day of fierce fighting. I'm just imagining myself being in the 2nd Vermont Brigade on that fateful day and watching 12,000 troops line up a mile away and charge towards me screaming their 'Rebel Yell'.
Not sure about its origins, but here is an old recording of CSA vets doing the rebel yell in the 1930's. Pretty impressive to see those old timers still belting it out.
Bear in mind that no one has ever been able to agree what the Rebel Yell sounded like, because there was no single version of it. It was an improvised thing, almost certainly differing from man to man and unit to unit. What we have left of it are the written recollections of men who heard it, and a few recordings of broken-down old men attempting to imitate their youths. It's likely that we will never know what it sounded like when 5,000 men went screaming into battle.
That said? In its most general sense, it was probably a shrill, nasal cry, scream, or whoop, made by keyed-up, jittery men advancing into fire. It frightened the enemy, promoted cohesion within the advancing unit, and boosted morale.
Copying and pasting one of my previous comments on a similar question
Waite Rawls, the head of the Museum of the Confederacy, led a project to take the recordings that we have and then simulate what a 70-man company screaming the rebel yell would sound like.
The simulation is downright eerie, and IMO does justice to the descriptions that were given of the Rebel Yell by Union soldiers.