One of the motifs of Civil War stories and literature is soldiers foraging for food. There's a story of my ancestor hiding under a bridge as the Yankees passed over. He told his comrades he was praying the entire time. When they asked if it was that the Yankees wouldn't see him, he replied, "No, but that the cow wouldn't mow."
My questions are
How common were groups of soldiers out foraging?
Did it happen mostly on the march, after battle, or while the troops were encamped for a long time?
Were there official regulations for foraging?
How many men under an officer would be officially sent out for that purpose?
How much were they expected to pay civilians for their food?
The whole foraging experience, for both armies, is going to be very different depending on the year of the war and which theater they were in. Some places - Western Theater - it is going to be brutal no matter which army it is. Others less so.
Both armies stripped the land around them. Especially before and during 1863 up through 1864. But… occasionally you would find pockets of land in the South that just hadn't been touched and remained untouched. It became less common as the war went on but it happened.
On the march, the Union army especially would drive beeves, sometimes 1500 or so. That isn't including sheep or any other animals and those animals alone would devastate the countryside marching through. The roads were mostly kept open so the army could keep moving through so both armies were using fields which meant vital crops for the people (and the army eventually, especially in the South) were being ruined).
At the beginning of the war, there was a big deal being made out of paying people for their food, especially in Confederate script because it hadn't become so devalued yet. As time went on, even Southern people wanted green backs or species whenever possible.
In different places and depending on the commander, North or South, some of the food/goods confisicated would be given a receipt which was often never honored after the war be the government. Most farmers hated getting them because they knew, whoever won, it was going to be very hard to get the value of produce/animals back.
Sometimes foraging was done violently and ruthlessly and left women and children without any food - that was especially so in the Shenandoah Valley in the burning campaigns of 1864 and in the Western Theater campaigns in Tennessee.
Other areas of the South like Mobile and New Orleans were little affected by foraging. Richmond's women suffered terribly because they couldn't get supplies in to adequately feed the population.
Lee's army suffered hugely from caloric deprivation as time went on because they simply couldn't get enough food in Virginia. The whole area was depleted and there was nothing left to forage.
I'm sure others will chime in soon but this is a start.