The Archer is an NPC Villager that can be recruited in Kingdom. It is one of the basic tier Villager Occupations and as such is available once you upgrade your Kingdom to Level 1.
As one of the basic units, all you need to do to unlock them is upgrade your Kingdom to level 1 for one Coin. Once upgraded both the Archer and Builder stalls will apear.
To get a Villager to become an Archer you must pay two Coins at the Archer Stall and stock a Bow. Then a Villager will pick up the bow providing you have recruited one from one of the Neutral Camps surounding the Kingdom.
Archers are a good early game source of income and will hunt Rabbits and Deer throughout the day to earn coin. At night the will retreat behind the Walls and fire arrows at incoming monsters.
Once built, Archers will man any Towers they find and will stay in the tower until killed or grabbed by Flying Trolls, if the tower is only Tier 1 then they can still be attacked by the Mountain Troll. Archers on higher tiers of tower can still be damaged by the boulders thrown by the mountain troll.
When attacked an Archer will drop its Bow and revert into a villager again. If the troll was killed before it can steal the bow then a villager will pick it up again if not it will go back to the stalls and pick up any tool that is in stock.