You must win the battles and decrease the loyalty of the city, once all troops have been killed and the loyalty is 0, if it is not their last city and you have an open city slot, you will conquer it. Depending what they have is what you will need to attack them with. Once all troops are gone and fortifications too it is typically safe and effective to send pony waves to kill the loyalty faster. Beware if they get reinforcements, ponies die easily.