Well, I know for a fact that mail goes back to
at least Roman times. Look up "lorica hamata". I believe it actually dates back to even before that, though. I've heard it's creation attributed to both the Celts and the Etruscans...not sure which is right. I'd have to guess that it evolved from earlier scale and lamellar armor.
It eventually spread all over the Old World; even to as removed of places as Japan. You could write a book on the different variations of mail around the world and still not be satisfied. But as far as medieval-ish European mail is concerned...let's see if I can get my definitions straight:
The Vikings wore a mail byrnie. Generally, the term "byrnie" refers to a mail shirt with short sleeves and relatively short hemline — about mid-thigh.
The term "hauberk" often refers to a longer mail shirt, sometimes with short sleeves, sometimes with long sleeves. The Normans at the Battle of Hastings would have worn a hauberk that reached down to about the knee. It also seems that at least some if not most Norman-era 'berks had an integrated coif. Chausses started appearing by the end of the 11th century, though they were rare and didn't really become commonplace until about the 12th century. You also started to see variations on ventails — flaps of mail covering the throat or face.
Personally, my favorite style of mail came in around the 12th-13th centuries. This is when knights would be covered head-to-toe in mail. Hauberks often had long sleeves that ended in mail mittens — mufflers — and an integrated coif with a ventail. Some people refer to these as "super-hauberks" to distinguish them from the Norman hauberks, but I've only heard that term a handful of times.
As plate armor began to gain popularity, mail got smaller. Haubergeon usually refers to a later-period, short sleeved mail shirt with a hemline somewhere between a byrnie and a full hauberk. The terminology is really rather imprecise, really. Hauberk and haubergeon are often used interchangeably, and byrnie can be used to refer to Viking mail in general, regardless of construction...it's all very confusing. Plus, there were so many different variations on a single idea. Some long-sleeve 'berks had integrated mufflers, some didn't. Some had an integrated coif, some were separate.
Anyway, by the time plate armor fully took over about 15th century, mail had widely been reduced to a skirt (the name of which I can't think of at the moment), a mail standard to protect the throat, and mail voiders sewn into the arming garment to the armpits. Basically, mail was used wherever it was impractical or difficult to cover with plate. Foot soldiers sometimes still wore some variety of mail shirt. Some helmets had a mail aventail hanging from them.
That's kind of it in a nutshell. A very large nutshell; there's a lot you could get into when discussing the history of mail. It eventually fell out of favor, of course but it still used now and then even today for reasons other than historical reenactment. Like this guy:
A mailled man is a man happy.