Spearmen are among the standard infantry available in Stronghold 2 and are a fairly slow and weak unit. You can recruit Spearmen from the rank of Knight. Unlike the Men-at-arms from Stronghold Legends who may throw spears, in Stronghold 2 Spearmen can only participate in melee combat.
They are often slow to arrive, and ranged units typically pick them off with four arrows. Crossbowmen, who use more powerful bolts, can kill Spearmen in a single shot due to their lack of Armour.
Spearmen require a spear from a Poleturner's Workshop to be produced and stored in the Armoury before they can be recruited. Poleturner workshops also become available at the rank of Knight. You will also need a single recruit from the campfire before you can recruit a Spearman.
Spearmen are cheap to produce and do not require any Honour. For this reason, they are the ideal troop to mass produce, especially earlier during a game when you have less resources available.
Tip: As with most weaker units, Spearmen are best served in stronger numbers. Given the right support by ranged units enough Spearmen can even kill a Knight. Use Spearmen wisely to make sure that your regular and more powerful troops take less damage, but in numbers they can be quite successful troops.