If it does not accept terms of peace but makes war with you, then you are to lay siege to it.
If it accepts your terms and submits to you, all the people found in it will become your slaves.
The Lord your God will deliver it over to you and you must kill every single male by the sword.