Look its really fucking simple, instead of being alone, travel with a buddy.
Make sure this buddy has a shield.
When you see a cavalryman running at you, or maneuver around to you, get close to your buddy and position yourself directly behind him.
Now when the horse is charging at you, you must steel your will and resist the urge to jump out of the way or run around like an idiot.
If the horse couch lances your friend and breaks the shield, he will be unable to do anything but maneuver away, this is your time to strike.
If the horse rams into your friend, he may start swinging at you, this is the time for you to block and your friend to get back up and strike.
If the horse rams both you and your friend, he will be stopped for a short duration, this is the time for both you and your friend to strike.
If you are alone, with no shield, do not jump up into the air as you are about to be lanced, you may try and down block if the lance is not couched. Find some terrain to hide behind instead.
The most important thing is to remain still. People end up chasing the horseman around, which is a bad idea, you become a broken and loose formation. If you have ever played any Total War games, you know how greatly effective any cavalry unit is against any type of foot unit that is in loose formation.
If you have a spear and shield combo that is outranged by every lance and find yourself being killed, you are not doing it right.
The reason people aren't as good against cavalry as they are against 1H/2H/Polearms is because nobody ever wants to duel a horse 1v1 on the duel servers, so nobody has developed any tactics or maneuvers except for the most experienced players.
Never travel alone because a cav will sneak up and eat you from behind. Especially true on maps with heavy fog.