Usually a company or two, sometimes an entire regiment, deployed in open order, with each man generally spaced five paces apart (though grouped in fours), fighting from behind cover and shooting from any position they found comfortable. That's what a skirmish line looked like. The purpose could be to screen the front or flanks, scout out the advance, act as a rear guard in a retreat, harass the enemy lines, counter enemy skirmishers, or drive off artillery batteries. In the case of infantry, they were usually several hundred yards, more or less, in advance of the main line of battle.
Cavalry often fought dismounted as skirmishers, and in doing so usually every fifth man was detailed to hold the horses in the rear.
Sharpshooter units in the ACW were essentially "professional skirmishers", as some here have referred to them as. They were the designated skirmishers for their brigade or division, and usually received extra training in skirmish drill. Not always but in many cases they consisting of picked men, not only for their shooting abilities but also for their personal bravery or physical strength so they could be quick and agile on the skirmish line. They were often designated pickets as well.
A couple accounts of what skirmishing was like:
"There is nothing in this world that is more exciting, more nerve stirring to a soldier, than to participate in a battle line of skirmishers, when you have a fair field and open fight. There it takes nerve and pluck, however, it is allowed each skirmisher to take whatever protection he can in the way of tree or stump. Then on the advance you do not know when to expect an enemy to spring from behind a tree, stump, or bush, take aim and fire. It resembles somewhat the order of Indian warfare, for on a skirmish line 'all is fair in war.'"
- D. Augustus Dickert, History of Kershaw's Brigade, pp. 421-22.
"Skirmishing, as it became reduced to a science, depended on two general rules: every man must keep concealed as much as possible behind trees, logs, fences, buildings, or what not, and each party must run upon the approach of its opponent with anything like determination. If a skirmisher should show himself unnecessarily he stood a great chance of getting hit, and if he waited until the enemy came within forty or fifty yards, it was exceedingly dangerous either getting away or staying. The skirmish line was conducted on principles that looked to personal safety in a great degree, and was the favorite position of the experienced soldier. If however the holding of the position was essential, which was seldom the case, the men knew it intuitively, and the skirmish line required a battle line to drive it."
- Aldace F. Walker, The Vermont Brigade in the Shenandoah Valley, pp. 56-7.