Were they used as covering fire to keep an enemy hunkered down under their shields, or was it really like in the movies where a large formation of archers would just annihilate half an army? And that said, if one was to be shot, were they more likely to die from infection as opposed to the actual wound?
So the military tactics of archery varied widely, but archers could be both rather ineffective and extremely effective, depending on the circumstances. Hollywood depictions of arrows going straight through people, shields, metal armor, houses, city walls, M1 Abrams tanks, Battleships, alien spaceships, and everything else is absolutely absurd. Bows could be powerful, arrows could penetrate deeply, but the way they're portrayed in the media is totally wrong. So to start out I'm going to talk about some basics of bows, archery, and also basic defenses against them.
The idea that bows have particular advantages that make them better than others, like somehow katanas are magically better than every other sword, is incorrect. There are fundamentally three basic kinds of bow in ancient and medieval times: the self-bow, made of a single piece of wood; the backed bow, made of wood with a sinew backing; and the composite bow, made of multiple layers of material including typically wood, horn/bone/antler, and sinew. An English longbow is a self-bow, while a Mongol bow would be a composite bow. Compositing layers was useful for increasing the power density of a bow, so a smaller bow could hold as much power as a large bow, and therefore was easier to wield from horseback. So you might automatically think, "well, why didn't they make giant 7 foot longbows like composite bows?" Well there's a few reasons for that: the strength and size of available materials, and draw weights. A 7 foot english longbow with a 120 lbs draw is going to be no more powerful than a 120 lbs draw composite bow. [EDIT: ~150 lbs] is about the upper limit of what humans can draw, and anything above that requires mechanical aids. We have crossbows that get over 1500 lbs, but they have to use late medieval steel prods and winches and the like so they can be drawn back.
So hand-drawn bows can be quite strong. Even at a significant distance, a 120 lbs bow can punch through quilted armor, and at close ranges might be able to penetrate metal armors, depending on how lucky you are and several extenuating factors. But the average draw used by the average man was not 120 lbs [EDIT: During the Roman era, I should be clear, as late medieval bows are much higher in median and average draw weights. In the Roman era, the Nydam and Qum Darya-Type bows are evidenced to be in the 60 to 80 lbs range]. There's a few obvious reasons for this: 1. Not everyone was as strong as everyone else, 2. Battles were about endurance, and higher weights fatigue quicker, and 3. It's easier to manufacture lower draw weights, especially when some bow types take a longer time to manufacture, and lower draw weights will last longer due to less strain on the materials.
Arrows are another matter. There are a lot of different arrowheads. A lot. The most common types are hunting and birding arrowheads, which do work on people, but aren't nearly as effective as dedicated military styles. Bodkin arrowheads appear as early as the Roman Principate, designed to get the point in through quilted garments and maille. I can't speak for the high and late medieval periods, but from Hellenistic times to the end of late antiquity the most common arrowhead was the trilobate arrowhead, which had a three-bladed diamond-shaped cross section. Leaf-bladed and barbed point arrowheads were also common, but the massive inventories we find in the forts on Hadrian's wall or the Danube are of Trilobate arrowheads. They're believed to have been more stable in flight and their third cutting surface allegedly made them better against quilted garments, shields, and flesh.
Likewise the most common type of bow was the so-called "Hunnic Bow" from the 1st century AD to the 7th century AD. It's actually not called the Hunnic bow, nor was it unique to the Xiongnu/Huns at all. In fact it was invented by a Sarmatian people near lake Baikal in the 3rd century BC, and by the 1st Century AD was adopted en-masse by the Roman military. They also were used all over Europe, the idea that composite bows "didn't work well" in the "moist, damp" conditions of west Europe is a myth. First of all you need to actually take care of and protect your bow, composite or not. If you take care of it, it'll be fine. And we find the lathes of hundreds of composite bows on Hadrian's Wall and other British forts, so they were clearly used en masse in west Europe. Self-bows and backed bows, i.e. "Longbows" like those found at Nydam and Thorsberg were also used in large numbers, but for the Romans weren't manufactured and issued to their troops. They were used by the various Germanic peoples though.
So bows and other missile weapons were used for a lot of reasons, but one was because they split apart improperly made shields. A planked shield that isn't faced with cow leather will split in three shots on average. This is because the cow leather, the glue, and the wood bonded together to reinforce each other. Even the paint and beeswax coating could have had an effect on making these shields stronger, but we don't know. But linen shields split apart a lot more easily, even when they're made of the cross-bracing strip construction like the Roman shields of Fayyum and Dura Europos. In battle, an improperly-made shield splitting leaves a gap for missiles to enter a formation, which can increase the size of that gap, which can in turn create and opening in a battle line.
However that was still a rather inefficient and ineffective use of bows. Throwing arrows at walls of shields was kind of a waste although missile support against them was important. Mostly, bows were used for skirmishing, or against cavalry. Horses are big targets: unlike infantry, which rely entirely on their shield (except the Romans, who had armor for a backup), you can't put a large shield in front of a horse. Armoring horses is difficult and expensive, although felted and even lamellar/scale armor was common on the steppes and in late antiquity and into the middle ages. But well-timed archery or other missiles can cut cavalry to pieces. The charge of the Goths at Taginae in 552 is a fine example of this, where the Romans had deployed their archers on the flanks and caught the Gothic cavalry in a cross-fire.
Wounds from arrows could be severe but weren't like being struck by bullets. Amputations were uncommon, as arrows didn't shatter bones to pieces when struck in the limb like bullets can. The biggest threat though was infection, which could be warded off with good medical practices (using copper and silver instruments, using alcohol to cure infection, etc.). So it ended up being a matter of where you were hit, and whether or not it got infected. In most cases though, wounds were rarely lethal, because your body would be protected by your shield, and wounds tend to be on the extremities (forearms, shins, feet, etc), followed by a bludgeoning to the head after the battle when the winning side picked off the wounded. The overwhelming majority of injuries came during a rout, when the loosing side turned and ran away, and they were most exposed. That was when archers did the most damage to enemy infantry.
Source:
Riesch, Holger. Pfiel und Bogen in der Romischen Kaizerzeit. 2017. - This is the most modern, comprehensive work on archery during the Roman and Early Byzantine periods there is. This was my main source for this, but I did use a few other minor ones which I can provide on request.
Well since you didn't specify region...
In West Africa, the archer had varying usage dependent on the location and climate.
In warfare, they tended to form up with a shield wall and soften up the enemy before engaging with a sword.
The Jolof Empire used archers extensively, and some even as mounted units. The Malian Empire was the foremost power in the region prior, and seems to be where much of the military traditions of later powers came from.
The archers' job was certainly not to annihilate the opposition on their own, but their lethality was something to be feared.
Within the range of the empire, but especially the peoples from the Senegambian region, the tactic of poisoning your missiles was very common. The arrow would be fired from a bow of low draw weight ( some on the order of 40lbs ) but the damage done could be fatal. Just a scratch could do in an opposing soldier.
We know that even into the 18th century, some armies in the former Malian Empire were using poisoned arrows effectively against gunpowder weapons.
According to Portuguese chronicles of the Jolof Empire's tactics, they would form up with shield bearing infantry in front and on the flanks with archers shooting from behind.
This is very much in keeping with John Hawkins' later testimony that 3 archers would form up tightly behind a shield bearer who wielded a double headed Javelin for his own defense.
These tactics seem to have been taught at an earlier time when the infantry mass would've needed to be tight against the cavalry regularly deployed by the empire and neighboring savannah polities.
Of note is that the archers had a large share in defeating both Portuguese and English coastal invaders despite the weakness of their bows.
The poison seems to have been highly effective, and the archers well trained enough to work in formations.
(Don't have my library at my disposal currently, but a great source which most of this comment is based on is "Warfare in Atlantic Africa" by John Thornton.)
I really love this question, and the answer given by u/FlavisAetivs. You guys make this sub great!