Archers are mainly used to defend cities early in the game. Their low combat strength makes it difficult to use it offensively, or against Horse Archers.
The Archer is replaced by the following unique units:
Archers should be built as early as possible. They're probably the best unit to defend cities until Longbowmen. Due to their promotions, they can also defend hills fairly effectively, which is useful if an enemy threatens to pillage your mines.
The bow and arrow, invented in prehistoric times, greatly improved the hunting skills of early man, allowing him to kill his targets from a distance. The bow was eventually adapted for use in battle, and was first used by Egyptian, Persian, and Assyrian armies as early as 5000 BC. The range provided by the bow allowed small forces of archers to rout armies of superior number armed only with hand-to-hand weapons. Archers were often used to soften enemy resistance prior to sending in mounted and skirmishing forces. Refinements in design and construction allowed the bow to remain an effective weapon until firearms finally replaced it in the 1500s.