The Confederate rank structure was somewhat different from those in the U.S. Army at the time.
At the bottom, you had the privates, no PFC like today.
You had four corporals per company, usually designated 1st, 2nd, 3rd and 4th corporals.
You had 5 sergeants per company, a company 1st sergeant, and then one sergeant per squad.
Next you have three lieutenants, 1st, 2nd, and 3rd. Sometimes the 3rd lieutenant is desginated as ensign (like the navy). Sometimes the ensign or sometimes a fellow designated a color bearer, color corporal or color sergeant, carried the regimental colors or unit colors into battle. Not a good job to have.
Above the lieutenants you have the captains.
Above Captain was a major, only one to a regiment in the C.S. A major might command an independent unit composed of four companies or less.
Above the major was the lieutenant colonel, who also might command an independent unit composed of between 5 and 9 companies.
A Colonel was in command of a Confederate regiment, which was usually composed of 10 companies, rarely more.
A brigade was composed of 2-5 regiments, (usually four), and was commanded by a brigadier general.
A Division was composed of 2-5 brigades (usually 3 or 4), and was commanded by a major general.
A Corps was composed of usually 3 divisions, and was commanded by a lieutenant general.
A full general, like Lee, Bragg, Johnston, commanded an army, e.g., Army of Northern Virginia, Army of Tennessee; though there were exceptions. Brigadier General Humphrey Marshall commanded the Army of Eastern Kentucky for example.
In addition to these ranks, the Confederates had other "ranks" as well.
In a regiment you would have an adjutant (paid as a lieutenant); an AQM (Assistant quartermaster paid as a captain); an ACS (Assistant Commissary Officer paid as a Captain); (A Chaplain, who might rank for pay purposes all over the map); and various degrees of surgeons. Some medical personnel might bear the title surgeon, but never practiced medicine in civil life at all; some physicians in civil life were ranked as hospital stewards, with enlisted grade pay. There was little rhyme nor reason for it, but most surgeons were paid as majors. A sergeant major, who was paid slightly more than the other sergeants. Various support enlisted ment were possible in various units, such as quartermaster sergeant, waggoneer, forage master, cooks, blacksmith, sappers, miners, etc., all of whom have those titles as their rank in Confederate records. And still further you had a group of "volunteer aids" who may or may not have been paid, and may or may not have been in any real danger.
It was a mixed bag of stuff
Regards
Jeff Weaver