Spearmen typically fight with a front line of Hobgoblin Shieldman (Fighter2) CR2 between them and the enemy to protect them. But if a spearman attacks over a shieldman to attack an enemy, that enemy gets +4 AC from cover.
Hobgoblin Spearman CR 2
LE Medium Humanoid (Goblinoid)
Init +3, Senses Listen -1; Spot -1; darkvision 60 ft.
Languages Common, Goblin
AC 16, touch 13, flat-footed 13
hp 25 (3 HD)
Fort +6, Ref +4, Will +0
Spd 30 ft.
Melee mwk glaive +8 (1d10+6)
Base Atk +3; Grp +7
Abilities Str 18 (+4), Dex 16 (+3), Con 16 (+3), Int 8 (-1), Wis 8 (-1), Cha 8 (-1)
Feats Toughness, Weapon Focus (glaive)
Skills Jump +9
Possessions studded leather, masterwork glaive