To enslave someone, or even be enslaved, you need to be either terran or miner race. To enslave, you can use the enslave link for recruiting players, or attack someone with enslave setting checked. You need to destroy 60% or more of the enemy fleet for a successful enslave attempt. Enslaving steals no planets, but enslaves the defender.
To break free, the slave needs to climb to 10 times the slave master`s pr and declare independence from the slave empires menu. Or the master can set the slave free, which you can ask them nicely to do.
The point of slavery is to leech income off of players, and to provide them protection to keep them your slaves.