Slavery

“I came here in peace, seeking gold and slaves.”
- Jack Handey, What I'd Say to the Martians
Slavery is the institution of owning other humans (as well as other sapient beings by extrapolation) as property. As slaves are bound to their owners, they were prevented from leaving or refusing to work under threat of immediate violence for disobedience. When two groups would fight it was not uncommon for the victor to capture some of the defeated along with the goods or territory and put them to work. Later on, as long-distance trade improved, they also began selling said captives to other cultures. The children of slaves usually were slaves themselves, though this was not universal. In other cases people would be put into slavery as a punishment, failure to pay their debts or voluntarily in a few cases to gain the favor of their superiors.
In addition to the practice of owning human beings as chattel there are other contemporary and historical arrangements so similar to slavery that they are referred to as slavery informally. A few of these include serfdom (serfs were not owned, but they were bound to the land owned by nobles and are required to work it), indentured servitude in colonial America (in exchange for passage to the new world being paid or to get rid of a debt someone would be indentured to a contract holder and have to work off his debt over a number of years), impressment and shanghaiing (where people were kidnapped from ports and forced to serve as sailors), the various forced labor programs used by the Nazis, Communists, and other despotic regimes and the victims of human trafficking which is still ongoing today.
Slavery in Fantasy
Because slavery is viewed as such a moral repugnance throughout the modern world it is an easy way for lazy GMs to get a reaction from players. Slavery being one of the common features of a setting's bad guys makes for an easy way to establish that civilization or organization is evil. A bunch of guys attack a peaceful village with chains and whips to catch and take away its people so they can be forced to toil, be beaten and raped, and maybe made to fight to the death in arenas for the amusement and benefit of some sick bastards? That is more than enough reason to establish "these guys are bad, so go kill their asses."
However, this is not always the case; both the perceived "good" and "bad" factions can also engage in slavery, although how they do it usually defines who's good and who's bad (regardless of how minute the difference is). Take Araby and the Dark Elves in Warhammer Fantasy's setting, for example. Both factions engage in wanton slavery and have no qualms about it being a common thing everywhere. However, what sort of defines each of them is how they see their slaves. In Araby, slaves have several rights, the slaves of children are guaranteed by law to not be slaves and particularly cruel mistreatment of slaves will result in punishment to the masters and the mistreated becoming free. The Dark Elves consider all non-Dark Elves to be beneath them and will torture and maim their slaves just because they think it is fun.
Though it is found in both, slavery is more common in fantasy settings than in science fiction. Why have a bunch of slaves working in an irradiated asteroid space mine when you could have a bunch of robots who don't need slave drivers, food, air, don't plot escape/rebellion (hopefully), and are stronger and easier to repair if damaged? Warhammer 40,000 actually justifies having slaves fairly well in that in the Imperium such automation is considered techno-heresy and the Dark Eldar are sick bastards who need to consume souls and get their rocks off at making others miserable.
Slavery of a certain kind is a common feature of many Magical Realms.
A digression about the Economics of Slavery
For serious worldbuilders who have it, you need to consider what Economics already considers a long-standing question: Is Slavery profitable in the long term, and if so where?
The consensus answer among Economic Historians to the first one is that yes, Slavery can be profitable, but it has some serious downsides that doom it that have nothing to do with its morality. (The answer to the second question is "agriculture (especially of cash crops), unskilled labor, and a bit of mining", in roughly that order of profitability.)
First, if sabotage is a serious concern, slavery is usually a non-starter. That rules out most semi-modern mining (anything past 50 feet in the ground, and a slave has a nice way to commit suicide while hurting his master at the same time), as well as just about any industry with any degree of mechanization, and a surprising amount of agriculture.
Second, slave populations have a tendency to drop over time, especially compared to relatively free populations (some thought on slave living conditions should lead to a few obvious conclusions why), so if you want to keep up, you need to raid for more slaves.
Third, slave-holding societies are usually economically out-competed by non-slave-holding societies, once military considerations are either removed or temporarily equal. There are plenty of reasons for this, but the big ones are the twin spectres of Incentives (which align more closely in non-slave societies) and Efficiency (effort you expend on keeping slaves from escaping or rebelling could usually be more productively used elsewhere, and that's just to start with).