Around level 40, and it costs roughly 10 gold to train.
Before that, hunters wear leather. You learn mail from your class trainer in exactly the same way as any other ability, so there is nothing special to unlock or find. Visit the trainer, pay the fee, and the armour type becomes available to you.
One thing worth knowing: the level requirement has shifted between expansions, so if the trainer will not teach it to you at 40, check your current level against the trainer's available skills list rather than assuming a bug.