Cave Spider Jockeys have 1% chance to spawn naturally in the Overworld. They also have small chances to be spawned with a Cave Spider Spawn Egg.
The skeleton that is riding the spider will shoot poisonous arrows at the player. The poisonous arrows will effect the player with the poison status effect, making them very dangerous. When the skeleton dies, the spider will start attacking at the player and will still poison him/her.
It is the best strategy to fight cave spider jockeys with a Bow, as you should not get close to them. However, an iron sword and above would kill them easily. You should also shoot the arrows behind the tree, so the jockey will not hit you.