The Swordsman is a Melee unit available in the Classical Era.
First appearing during the Bronze Age, the earliest swords were little more than extra-large daggers. It wasn't until the development of iron forging (in approximately 1200 BC in Europe) that swords became viable combat weapons. The earliest swords were short and sharp, designed primarily for stabbing. Further advances in iron-work allowed bigger swords, and by the Middle Ages monstrously-long and heavy two-handed swords could cleave through all but the toughest armor.
The Swordsman is the most powerful standard melee unit during the early game, much stronger than the Spearman and Warrior. Armed with the first forged weapons and armor, the Swordsman can soak up quite some damage and as such are very useful as a first line of defense and when attacking early-era cities. A player that has Swordsmen can decimate large lines of Spearmen or Warriors very quickly.
Swordsmen are particularly vulnerable to mounted units, as all bar the Chariot Archer can move after attacking, getting a hit and moving away so the Swordsman can't retaliate. Also, keep in mind that you'll need Iron resources to train Swordsmen.