In general, your capital is located in the richest province of the area belonging to the main title you have:
- So if you are a king of Sicily and you own all island of Sicily (as your direct demesne), your capital will be probably in Trapany (or other richest province). If disiease strikes Trapani, your capital moves to another richest province in Sicily. Same happens if you give away/loose your capital province.
And if you for example conquer Byzantium, even if the province is 10x richer than Trapani, your capital will not move there, as Byzantium province is not a "core" province of kingdom of Sicity, which is your primary title.
You can eliminate provinces where you DO NOT want to have capital by giving them away to your vassals, but there is no way how to choose any province as your capital (especially if you want to choose a poor province).