The custom of ransom ensured that medieval battlefields were not as deadly as they might otherwise have been. Because a vanquished enemy could be held for ransom, killing the defeated ran counter to the self-interest of the victors. The prospect of turning a captive into gold by selling him back to his family curbed the swords of many a medieval fighting man -- but only as long as the defeated was likely to possess sufficient wealth to make it worth the trouble of keeping him around and negotiating the ransom. (For more detail see: The Time-Honored Tradition of Ransom)
However, not everyone one who fell into the hands of an enemy was in a position to pay a ransom. Members of the militant orders, for example, were prohibited from offering ransom as they were expected to die a martyr's death for their faith. This, as much as hatred and fear of them, explains why Saladin ordered the execution of all Templar and Hospitaller prisoners after his victory at Hattin. Likewise, archers and other infantry were generally considered too poor to pay and were therefore not given the option. In the West they were either killed on the battlefield or mutilated to make them unfit to fight again -- which, of course, also had the effect of making them unemployable and so condemned them to a life of beggary. During the Hundred Years War, for example, it became customary for the French to cut off captive the bow finger(s) of captive English archers -- leading allegedly to the modern custom of "showing the middle finger" (bow finger) as a gesture of defiance and contempt.
In the East, however, where slave-holding societies dominated the landscape, captives not deemed worthy of ransom were more likely to be sold into slavery than killed or mutilated. The custom of selling prisoners-of-war as slaves gave even men of no means a monetary value that discouraged their victors from executing them outright. In slave-owning societies, furthermore, there were many uses for the kind of able-bodied, young men, who made up the largest portion of manpower in medieval armies. Slaves have been used since antiquity particularly in construction, stone-quarrying, and mining, for example, but also in agriculture and industry. We should not forget that almost all of Athens' magnificent pottery was made by slaves.
For civilians captured when a city fell to siege or when the rural countryside was over-run, the fate was death or slavery. Elderly or sick people, who could not be expected to become productive slaves, were usually slaughtered immediately. Very small infants, who required care and feeding before they could become productive, were likewise butchered at once. Generally, only children over the age of five or six were deemed capable of working and so worth sparing. The uses for child-slaves were diverse. Because of their small hands, for example, they are considered particularly good at basket weaving and carpet making.
Women, of course, were primarily used in sexual slavery. The following passage from Imad ad-Din, one of Salah ad-Din's secretaries and author of a biography of Salah ad-Din describes the fate of the civilians unable to pay a ransom after the surrender of Jerusalem in 1187.
As this passage makes clear, female prisoners would be raped at capture and then either pimped by the men to whose lot they fell or sold to a slave trader for cash, who could sell them again to an individual master as a sex slave or to a brothel for the use of thousands. The practice is still the norm in ISIS controlled territory.
There were more than 100,000 persons in the city, men, women and children. The gates were closed upon them all, and representatives appointed to make a census and demand the sum due. ... About 15,000 were unable to pay the tax, and slavery was their lot; there were about 7,000 men who had to accustom themselves to an unaccustomed humiliation, and ... dispersed as their buyers scattered through the hills and valleys. Women and children together came to 8,000 and were quickly divided up among us, bringing a smile to Muslim faces at their lamentations. How many well-guarded women were profaned, how many queens were ruled, and nubile girls married, and noble women given away, and miserly women forced to yield themselves, and women who had been kept hidden stripped of their modesty, and serious women made ridiculous, and women kept in private now set in public, and free women occupied, and precious ones used for hard work and pretty things put to the test, and virgins dishonoured and proud women deflowered, and lovely women's red lips kissed and dark women prostrated, and untamed ones tamed, and happy ones made to weep! How many noblemen took them as concubines, how many ardent men blazed for one of them, and celibates were satisfied by them, and thirsty men sated by them, and turbulent men able to give vent to their passion. How many lovely women were the exclusive property of one man, how many great ladies were sold at low prices, and close ones set at a distance, and lofty ones abase, and savage ones captured, and those accustomed to thrones dragged down!
Older and ugly women and worn-out sex slaves could then be re-cycled for other uses such as serving in houses, cooking, cleaning, looking after the children, the sick or aging, or could even be employed in heavy labor such as construction and industry until they collapsed and died.
The appalling fate of Christian captives in Saracen slavery is a major theme in Envoy of Jerusalem.