Skirmish
Ancient history: In ancient warfare, skirmishers typically carried bows, javelins, slings and sometimes light shields. Acting as light infantry with their light arms and minimal armour, they could run ahead of the main battle line; release a volley of arrows, sling stones, or javelins; and retreat behind their main battle line before the clash of the opposing main forces. The aims of skirmishing were to disrupt enemy formations by causing casualties before the main battle and to tempt the opposing infantry into attacking prematurely, thus throwing their organization into disarray. Skirmishers could also be effectively used to surround opposing soldiers in the absence of friendly cavalry.
Once preliminary skirmishing was over, skirmishers participated in the main battle by shooting into the enemy formation, or they joined in melée combat with daggers or short swords. Their mobility made skirmishers also valuable for reconnaissance, especially in wooded or urban areas.
In Classical Greece, skirmishers originally had a low status. For example, Herodotus, in his account of the Battle of Plataea of 479 BC, mentioned that the Spartan Army fielded 35,000 lightly armed helots to 5,000 hoplites, but there is no mention of them in his account of the fighting. Often, Greek historians ignored them altogether, but Xenophon distinguished them explicitly from the statary troops. It was far cheaper to equip oneself as lightly armed than a fully-armed hoplite. Indeed, it was common for the lightly armed to go into battle equipped with stones. The low status of skirmishers reflected the low status of the poorer sections of society that made up skirmishers. Additionally, hit-and-run tactics went against the Greek ideal of heroism. Plato gives the skirmisher a voice to advocate "flight without shame" but only to denounce it as an inversion of decent values.
Nevertheless, skirmishers then chalked up significant victories, such as the Athenian defeat at the hands of the Aetolian javelin men in 426 BC and, during the same war, the Athenian victory at the Battle of Sphacteria.
Skirmisher infantry gained more respect in subsequent years, as their usefulness was more widely recognised and as the ancient bias against them waned. Peltasts, light javelin infantry, played a vital role in the Peloponnesian War, and well-equipped skirmisher troops such as thureophoroi and thorakites would be developed to provide a strong mobile force for the Greek and the Macedonian armies.
The Celts did not, in general, favour ranged weapons. The exceptions tended not to include the use of skirmishers. The Britons used the sling and javelin extensively but for siege warfare, not skirmishing. Among the Gauls, likewise, the bow was employed to defend a fixed position. The Celts' lack of skirmishers cost them dearly during the Gallic Invasion of Greece of 279 BC when they found themselves helpless in the face of Aetolian skirmishing tactics. Thracians were famous for their skirmish war tactics and offered their services as mercenaries more than once  in the Greek civil wars in ancient times.
In the Punic Wars, despite the Roman and Carthaginian armies' different organisations, both had the role for skirmishers as screening the main armies. The Roman legions had a specialised infantry class, Velites, which acted as skirmish troops who engaged the enemy before the Roman heavy infantry made contact, and the Carthaginians recruited their skirmishers from the native peoples across the Carthaginian Empire.
The Roman army of the late republican and early imperial periods frequently recruited foreign auxiliary troops to act as skirmishers to supplement the citizen legions.

Middle Ages: Medieval skirmishers were generally commoners armed with crossbows or longbows. In the 14th century, although long held in disdain by the aristocratic Castilian heavy cavalry, the crossbowmen contributed greatly to the Portuguese victory at the Battle of Aljubarrota. Similarly, English archers played a key role in the English victory over French heavy cavalry at the Battle of Crécy. In the next century, they largely repeated that feat at the Battle of Agincourt. Such disasters have been seen as marking the beginning of the end of the dominance of medieval cavalry in general and of the heavy cavalry in particular.

Early modern period: 

Americas: The Seven Years' War and American Revolutionary War were two early conflicts in which the modern rifle began to make a significant contribution to warfare. Despite its lower rate of fire, its accuracy at long range offered advantages over the smoothbore musket, then commonly used by regular armies. In both wars, many American frontiersmen served in the militia. The Continental Army during the American Revolutionary War was assisted by such irregular troops, such as the Minutemen, who engaged in skirmishing tactics by firing from cover, rather than in the open-field engagements that were customary at the time. Their tactics were influenced by experiences in fighting Native Americans. Militia in a skirmish role was particularly effective in the Battle of Cowpens. The character of Natty Bumppo in James Fenimore Cooper's novel The Last of the Mohicans was notably called La Longue Carabine by the French because of his skill with the long rifle, which was common among the Colonials.

Napoleonic Wars: During the Napoleonic Wars, skirmishers played a key role in battles; they attempted to disrupt the main enemy force by firing into their close-packed ranks and to prevent enemy skirmishers from doing the same to friendly troops. Because skirmishers generally fought in open order, they could take cover behind trees, houses, towers and similar items, thereby presenting unrewarding targets for small arms and artillery fire. Such tactics often made them vulnerable to cavalry. Some skirmishers had a minor sapper role by placing cheval de frise to deter cavalry.
A skirmish force screening the main body of infantry became so important to any army in the field that eventually, all major European powers developed specialised skirmishing infantry. Examples included the German Jäger, the French voltigeurs and the British riflemen.
Muskets were the predominant infantry weapon of the late 18th century, but the British Army learned firsthand of the importance of rifles during the American Revolutionary War and began experimenting with them shortly thereafter, resulting in the Baker rifle. Although slower to reload and more costly to produce than a musket, it was much more accurate and proved its worth during the Peninsular War. Throughout the conflict, British riflemen could selectively target and eliminate the officers and NCOs of French forces from outside musket range.
During the War of 1812, American riflemen again contributed to British casualties but also had to contend with the revised British light infantry tactics.
A consequence of those wars' experiences was a trend to training line troops to adopt tactics that had been used only by skirmishers.

American Civil War: The treatise New American Tactics, by General John Watts de Peyster, advocated making the skirmish line the new line of battle, which was then a revolutionary idea. During the American Civil War, cavalrymen often dismounted and formed a skirmish line to delay enemy troops who were advancing toward an objective. An example was the action of the Union cavalrymen led by Brigadier General John Buford on the first day of the Battle of Gettysburg. Skirmish lines were also used to harass enemy probing missions, hampering the other force from gaining an effective intelligence picture by engaging their scouts, and likewise forcing them to deploy.

Late modern period: By the late 19th century, the concept of fighting in formation was on the wane. Heavy infantry had disappeared, and all infantry effectively became skirmishers. The term has become obsolete, but as late as World War I, it continued to be associated with battlefield reconnaissance screens, which are essentially modern skirmish lines. As in the American Civil War, the primary role of the infantry skirmish line was to screen the advance of a parent force and to disrupt the enemy's own reconnaissance efforts. With the mechanization of modern warfare, the role of infantry skirmishers was more or less combined with those of light cavalry, as mounted scouts in specialized reconnaissance vehicles took over the responsibility of screening large formations during maneuvers, in addition to conducting their own probing actions.

Cold War and beyond: Some modern military units still use light and heavily armed units in conjunction. For example, the Soviet Army routinely deployed more lightly armed motorized rifle regiments as skirmishers on the flanks or secondary sectors of a motorized rifle division on the offensive, and the heaviest units, backed by the heaviest armour, would fight in the division's main effort. The modern US military has light rapid-deployment Stryker brigade combat teams working with heavy-mechanized and armored units, with tracked M2 Bradley infantry fighting vehicles and M1 Abrams tanks forming the primary combat force.
Apartheid South Africa's military doctrine stressed the use of highly-mobile, light-mechanized forces that could cover ground swiftly while they kept heavier enemy armoured and infantry formations off balance and did not engage until the conditions were favourable. The lightly armed South African units used tactics such as rapid movement, flank harassment and confusing the enemy with continuous maneuvering to compensate for their inferiority in firepower when they were faced with Angolan and Cuban forces during the South African Border War. The innovative use of South African reconnaissance units to throw Angolan tank formations into disarray before it lured them into ambushes, effectively deploying the units as skirmishers, was another consistent feature of that conflict.