How did they train generals for the day that a war might come, were they a part of the army despite there being no war?
How about the 97% percent of the union army during the civil war, was it lead by professional generals, if so who trained them and paid for them before the war? What about the majors sergants and so on, how where the ranks assigned if there was no standing army in which to advance in rank?
The pithy version is that it didn't. The vast majority of Civil War officers had no prior experience commanding at that level, and often none whatsoever. The generals during the war were by and large lieutenants and captains before the war, with a few field grade officers here and there. Grant was a captain, Lee was a colonel, Jackson was a 1st Leiutenant, Sheridan was a 2nd Lieutenant; needless to say, the duties and role of a regimental quartermaster or a lieutenant of artillery are in a different universe than commanding field armies approaching 100,000 men or even corps of 30,000. However, due to the absolutely minuscule size of the prewar US Army, these officers were the largely the only ones on hand, so they had to make do.
Regarding lower leadership ranks, most officer positions were held as a result of election by the men, though the colonel of the regiment would hold his position as a result of having been the man to raise the regiment for volunteer service in the first place, regardless of military expertise (or lack thereof). In the Confederate service, the generals and government officials were able to appoint regimental and company officers as they pleased; men who had been elected to colonel were bumped down to captains so a graduate from the Virginia Military Institute could command the regiment, things like that. As the war dragged on, the War Department in Washington and the generals were able to better control the appointment of regimental officers; colonels could select NCOs from among the ranks based on performance.
So broadly, no, ACW armies were not led by professional generals, and their regimental and company officers were almost wholly amateur.