In the Elder Scrolls lore Slavery was something of a contentious issue. The Imperials are themselves a "race" descended from slaves, liberated by their venerated heroine, Saint Alessia, and culturally they view it as an abomination. On the other hand, the Ayleids, who still exist in a degenerated form in Valenwood during the Interregnum, view slavery as a "gods-given-right", much as the other Mer see slavery. Despite this, the practice has died out in much of Tamriel, but that doesn't mean it can't make a resurgence.
To allow Slavery you must first belong to a religion that "accepts" it; most religions will allow you to legalise Slavery, but some will not. The Human Pantheon, the Khajiit Pantheon and the Tang Mo Pantheons are unable to legalise slavery due to cultural and religious moors against the practice. For the Humans it represents their long servitude to the Mer, to the Khajiit it is abhorrent to take the freedom of another Khajiit or sentient in general, not so much for religious grounds but rather that it conflicts with their hedonistic, anarchistic and extremely "free" loving attitude and general state of being.
Once you have allowed Slavery, some new options open up to you. Firstly, any prisoners you have that are *below* Duke level (so Counts, Barons, Unlanded = Fair Game) can be sold in to slavery. This is right now effectively a form of execution, that character is removed from the game, and in exchange you, the Slaver, receive a certain amount of gold based upon the person sold. Healthy, Strong, Intelligent slaves will fetch much more gold than weak, sickly slaves.
In addition to being able to sell Prisoners, when a person is "raiding" or "looting" and their crown law title has slavery allowed, they will get an event allowing them to procure slaves while raiding the province for it's gold as well. This will in turn give even more gold to the Slaver, and one random province within the Slaver's demesne will gain the "Slaves" modifier.
Similarly, when successfully sieging a province during wars Slavers will get the option to Enslave the local populace with the same results as looting.
Slavery isn't all good, however, as you will start to see some of your more friendly and freedom loving vassals gaining the "Liberator" trait, which gives them a free cassus belli against you for being a Slaver; Liberators from outside your own realm also gain this free CB. On top of this, selling prisoners into slavery can cause any vassals who share that person's culture to gain a negative opinion modifier towards you (if you share the persons culture, then only Kind/Charitable/Honourable people will gain the negative mod), and the person's family will despise you.
In addition to the Liberators and opinion modifiers, who can cause a constant headache for you, there are Slave Rebellions to take into consideration.
Normally Slave Rebellions will only occur when you have a high revolt risk in a province with Slaves, but on the rare occasion a Slave Rebellion can simply be triggered by an over-zealous slave owner...