Just to bound the question in time and place, let's say a Saxon in England c. 500 AD or so -- not long after the Roman period, but probably long enough they're making their own mail shirts.
Questions like these are always impossible to answer precisely, or in any quantifiable sense. We haven't any surviving, fully intact mail shirts from the 6th century, nor can we reconstruct it exactly - the metallurgy, if nothing else, will always be a bit off. There have been some limited tests performed using reconstructed mail, most notably by Alan Williams. But, we can speak generally about what mail did for the warrior who wore it. I'm not an expert on the Migration Era, but these comments should be applicable to mail in general.
As far as we know, the mail being worn in 6th century England - indeed, through to about ~1100 - would be very similar to that worn by the late Romans. This would consist of a short-sleeved shirt, hip or perhaps mid-thigh in length, made from 10,000-20,000 iron rings, half riveted and the other half solid. While later medievals would wear some kind of padded garment under their mail, there is no evidence for such at this time. Absence of evidence is not evidence of absence; we simply can't know.
As mentioned above, Alan Williams conducted a series of tests using reconstructed mail made from riveted, mild steel rings and various weapons. Williams found that one-handed swords, whether used to slash or to stab, were wholly incapable of piercing his reproduction mail sample; they simply can't generate enough force. He found that bodkin arrows could defeat the mail itself, but struggled to penetrate the padding worn beneath it; only if the arrow was delivered with a force of 120 joules was the armor completely defeated. Lance thrusts and halberd slashes required more than 200 joules to defeat the armor. Again, though, we cannot assume that these tests entirely reflect the reality of medieval armor. I should note that he also tested a 15th-century mail sample, which produced slightly inferior results, but I'm hesitant to make any assumptions from that; most things don't work quite as well 550 years down the line.
So, if experimental archaeology can't fully answer our question, what are we to do? Like all those trained in history, I'm going to suggest that we - say it with me - Read The Sources! I'm sad to say that basically nothing survives from 6th century England, so we will have to extrapolate from other sources describing the use of mail. Rather than dig through every primary source I can find looking for references to mail - sorry, I don't love you that much - I will turn to this article by Dan Howard, who has helpfully collated a number of passages referencing the effectiveness of mail armor.
From Ammianus Marcellinus, describing the Siege of Amida in 359:
The Persian infantry found it hard to avoid the arrows shot from the walls by the artillery, and took open order and since almost no kind of dart failed to find its mark, even the mail-clad horsemen were checked and gave ground.
From Joinville in the 13th century:
...and whilst the Turks were fleeing before him, they (who shoot as well backwards as forwards) would cover him with darts. When he had driven them out of the village, he would pick out the darts that were sticking all over him; and put on his coat-of-arms again... Then, turning round, and seeing that the Turks had come in at the other end of the street, he would charge them again, sword in hand, and drive them out. And this he did about three times in the manner I have described.
From Baha'al-Din, writing about the Third Crusade:
...drawn up in front of the cavalry, stood firm as a wall, and every foot-soldier wore a vest of thick felt and a coat of mail so dense and strong that our arrows made no impression on them... I saw some with from one to ten arrows sticking in them, and still advancing at their ordinary pace without leaving the ranks.
From Galbert of Bruges, discussing a 12th century archer named Benkin:
And when he [Benkin] was aiming at the besiegers, his drawing on the bow was identified by everyone because he would either cause grave injury to the unarmed or put to flight those who were armed, whom his shots stupefied and stunned, even if they did not wound.
From Usamah ibn Munquidh, describing an encounter in which he struck a Frankish knight in the side with his lance:
He bent sideways so much that his head reached his stirrup, his shield and lance fell off his hand, and his helmet off his head...he then resumed his position, erect in the saddle. Having had linked mail under his tunic, my lance did not wound him.
Same author:
A Kurd named Mayyah smote a Frankish knight with a lance, which made a piece of the link in his coat of mail penetrate into his abdomen, and killed him.
Ibid:
...the horseman who struck Philip the knight, for verily the Franks have all been astounded on account of that blow which pierced two layers of links [back and front] in the knight's coat of mail and did not kill him.
What can we make of these sources, and why did I assault you with them? Basically, what we can see is that, at least on these occasions, mail could provide prodigious protection from a variety of weapons, and this supports the results of Williams' tests. It was consistently difficult to pierce by archers at long range, and could stand up to lance thrusts under certain circumstances; under other circumstances, it could fail spectacularly. The accounts don't describe its effectiveness against swords, but given that arrows and lances outperformed swords significantly in Williams' tests, I think we can assume that he is largely correct in thinking that swords would have grave difficulty in penetrating mail.
Finally, a note on the purpose of wearing armor. The idea is not to make one's self invulnerable; that is patently impossible. Humans, given enough time, will always find ways to get through the armor. The idea is not to give them the time. Armored men simply have a much larger margin for error than unarmored men and can take risks that the latter can't. I've used the metaphor of a car's seat belt before. Even if you wear your seat belt, there are some collisions that simply aren't survivable. But, by wearing your seat belt, you greatly lower the odds of that happening. An accident that would have killed you becomes one that seriously injures you; an accident that might have seriously injured you becomes one that you walk away from with bruises.
It's the same principle with armor. A battle is not a duel. Whether in a small-unit skirmish or the rarer pitched battle, in which you are fighting shoulder-to-shoulder in a close formation, against enemies in a similar formation, most blows will not be perfectly aimed and delivered because the fighters' main priority is not dying. It doesn't matter how bad ass your mail shirt is if someone cuts your hand off or stabs you in the testicles; you're out of the fight. But, where even a glancing blow will injure a wholly unarmored man, an armored man can shrug it off and keep on trucking. The knowledge that he is protected from most blows makes for a much more effective fighter because he has the self-confidence to fight more aggressively than someone who isn't armored.
Works Cited
The Knight and the Blast Furnace, by Alan Williams.
Mail: Unchained, by Dan Howard.
/u/Rittermeister's answer is excellent, and I agree with everything they said. Our evidence is patchy, but what know suggests these were difficult garments to defeat.
To add a little, we have 2 near-contemporary references (from early-middle Anglo-Saxon England) about the level of protection they provided. One is, unfortunately, the ?8th century poem Beowulf. I say unfortunately, because while it does describe mail turning aside a hard stab from a seax, that mail was made by the mythical smith Wayland. Was this magical garment really representative of what ordinary armor could accomplish? The second is from a Christian writer named Aldhelm who wrote riddles in Latin in the later 7th century. This one is a bit problematic, too, because Aldhelm had a tendency to write about things he'd read in books rather than actually experienced; so is he really describing contemporary armor, or just repeating an old chestnut he found in a Roman book? Here's his riddle (note the reference to arrows):
The dewy earth brought me forth from its icy innards; I am not made from the bristly fleece of wool; no loom-leashes pull me nor do noisy threads rebound, nor do Chinese worms weave me from their yellow floss; I am not tortured by beams nor beaten by the cruel comb; yet, lo, I am called a coat in common speech. I do not fear arrows drawn from long quivers.
(this is Megan Cavell's translation from her amazing blog -- you should check it out if you want to learn more about this riddle, and two that copied it, about mail, or other riddles like it.)
Another thing to consider is the material that weapons, not mail, were made from in the sixth century. Most swords had edges made from low-carbon, low-phosphorus iron that was extremely soft. Spears were often made from the same material, and had blades that were very thin -- typically 6mm. This metal had a lot of slag in it which provided a surprising amount of stiffness to the soft material, but ultimately it wouldn't have taken much to bend a spear's blade on a hard stab. /u/Rittermeister cites Alan Williams' experiments which found that human arms struggle to produce enough force to punch through mail, and that's half the advantage the armor has; but the other half is that the weapons people were using might bend before the armor broke. If you had a mail shirt, you were in pretty good shape.
That said said, there's very little evidence that many people in 6th century England did have mail. It's incredibly rare in the archaeology, and while that might just mean that people didn't throw it away, it's probably really a reflection of the fact that most people in England at this period were farmers who fought on the side, with few being wealthy enough to afford to support a smith for the amount of labor it takes to finish a mail shirt. A 6th century spearhead can be forged in a few hours, and usually takes about 3-9oz of iron to make. A mail shirt, in contrast, is something like 400oz of iron, and takes hundreds of hours of drudgery to produce. That means that a single shirt is worth the weapons of a small army in materials and labor (literally: Ine's 7th century law code defines an army as more than 35 men). The only mail shirt we have in the archaeology of this period in England is from Sutton Hoo, the wealthiest single grave ever discovered in England (and, importantly, this grave was from the early 7th century; there weren't, as far as we can tell, any English kings as wealthy as this a century before c. 500). We have several more in W. Europe (like Gammertingen, the grave in Germany I mentioned in my comment below), but on the whole they appear extremely infrequently. Some have suggested that they were only being produced in the east (Byzantium) and had to be imported, at least during the 6-7th centuries; this is difficult to confirm.