The Torah contains numerous references to slavery: i guess by today's standards it seems pretty bizarre to condone any form of slavery... but at the time these laws were probably pretty liberal. Nevertheless, if you believe in the Torah as the word of God dictated to Moses - then you do have some explaining to do... "oh- they weren't REALLY slaves- more like servants!". Intricate and long winded rabbinical explanation here.
Summary:
OK THINGS TO DO WITH YOUR SLAVES
keep male and female slaves
keep 'hebrew' and non-hebrew slaves
beat them around a bit so they take a few days to recover
rape or have sex with female slaves as long as they weren't betrothed (implied but not stated)
NOT OK
keep them for more than 6 years (but you can keep their wives and children)
knock out a tooth or an eye (that'll set them free!)
kill them
rape or have sex with betrothed slaves (you'll need to make a steak offering at the steakhouse temple for that one).