Le Deutéronome 15:12 Halakha : Mishneh Torah, Slaves

כִּֽי־יִמָּכֵ֨ר לְךָ֜ אָחִ֣יךָ הָֽעִבְרִ֗י א֚וֹ הָֽעִבְרִיָּ֔ה וַעֲבָֽדְךָ֖ שֵׁ֣שׁ שָׁנִ֑ים וּבַשָּׁנָה֙ הַשְּׁבִיעִ֔ת תְּשַׁלְּחֶ֥נּוּ חָפְשִׁ֖י מֵעִמָּֽךְ׃

Si un Hébreu, ton frère, ou une femme hébreue te sont vendus, ils te serviront six ans; et la septième année tu les renverras, libres, de chez toi.

Mishneh Torah, Slaves

A Hebrew servant that is spoken of in the Torah, is a Jew that court of law sold against his will or sold himself of his own will. How so? ...