If Allaah enables the Muslim mujahideen to defeat kaafir enemies in war, then the men may be killed, ransomed, set free without ransom or enslaved. The choice between these four options is to be made by the ruler, according to what he thinks is the best course.
With regard to the women, they become slaves and “those whom one's right hand possesses” (described as a “right hand servant” in the question). Male children also become slaves. The ruler shares out these slaves among the mujaahideen.
Shaykh al-Shanqeeti (may Allaah have mercy on him) said: The reason why a person may be taken as a slave is his being a kaafir and waging war against Allaah and His Messenger. If Allaah enables the Muslims who are striving and sacrificing their lives and their wealth and all that Allaah has given them to make the word of Allaah supreme over the kaafirs, then He allows them to enslave the kuffaar when they capture them, unless the ruler chooses to free them or to ransom them, if that serves the interests of the Muslims.