typically 3 things stop horse archers. (in no specific order):
1) your own artillery. because foot missile troops will be better skilled and hit their targets much more often than horse missile troops. the best anti-horse-archer artillery that ive seen is throwing weapon troops with shields, or the rhodok xbowmen. the throwers have the huge advantage that, while they might take longer to shoot down the horse-archers than the xbowmen...they dont take damage while doing so because they have shields to block all the arrows while they return fire. nords and sarranid are great at disabling enemy horse archer skirmishing.
2) cavalry. horse archers cant shoot behind themselves. to shoot a bow/xbow on horseback you need to turn your horse so that your target is between your left side and front side. its about a 120 degree arc id say? beyond that, you cant fire a bow/xbow, you have to turn your horse. this means that horse archers are always having to circle around, reposition themselves, and ultimately they actually move around rather slow, because they are always turning and zig zagging. cavalry are able to simply charge head on and either use lances to pummel the horse archers or normal 1h/2h weapons to melee them on horseback.
3) fighting in hilly/mountainous terrain. horses cant move for crap on hills, and foot troops will in fact have the advantage in mobility.
it is plenty easy to take out horse archer armies with purely foot troops, just have to try and make best use of positioning, terrain, and as i said above, you will have to have some method of throwing/shooting something back at them. the AI isnt super smart though and will often make mistakes and get into melee range. so even a bunch of spearmen with a few shield infantry to block the arrows, could eventually catch the horse archers and spear them down rather quickly.