Complex sentence: Most of the slaves in Ulcinj came from Italy and Dalmatia and were captured by Ulcinj pirates, who robbed people in the rich villas along the coast of Apulia and Sicily, then captured them and sold them as slaves.
Split into simpler sentences: Most of the slaves in Ulcinj came from Italy and Dalmatia. The Ulcinj pirates mostly robbed people residing in rich villas along the coast of Apulia and Sicily, then they would capture them and sell them as slaves.