Pedants will insist the words chain and mail mean the same thing and chainmail is therefore redundant in much the same way as the terms cash money and past history. While this is not as clear-cut as one may have been told, the argument can be made for that usage so we will employ it here.
Chain is familiar enough to most readers as to render a detailed explanation unnecessary. Instead, we will focus on terms commonly used in conjunction with chain.
Lets us begin with a common form of chain, the chain shirt. A knee length chain shirt is a hauberk. If mid-thigh length the term haubergeon is used. A chain coat, popular in medieval Europe, was called a byrnie.
There are several patterns to assembling the rings for chain armor, with the most common being 4-to-1. This means each link links to 4 others. These links were riveted, though sometimes riveted links were alternated with solid links. Less effective were butted links. Butted means the ends of the wire link touch each other but were not fastened. Welded links appear to have possibly been used as well.
Material used in most D&D campaigns would likely be wrought iron, though steel or bronze could also be used.
Effectiveness of chain rests upon four factors: link type, link material, link weave density, link thickness. A well made suit of chain was effective versus slicing and piercing attacks, but less effective against bashing attacks. A full suit of chain would also include leggings, head protection, and even mittens.
Plated mail, the type referred to in the D&D rules as plate mail, was simply chain with plates attached to it. It is typically the best mundane armor protection in the rules as written.
This is not the type of armor normally seen in museums or conjured up by young lads dreaming of King Arthur and his Knights of the Round Table. That type of armor is referred to as plate and is not part of early versions of the game until Unearthed Arcana for AD&D was published by TSR in 1985. There it was given the values AC 1 for field plate and AC 0 for full plate, basically light and heavy versions (respectively) of the same type of armor.