It happens in several stages:
1) The hero must be leveled up (if I'm not mistaken, to around level 10).
2) When entering a town, this hero can destroy the built structures (for a certain price).
3) When all buildings are destroyed, ghosts will settle in the town, and the town will be unavailable for a couple of days... i.e., the town will be ruined.
4) Then you need to fight the ghosts, and after defeating them, you can rebuild the town. Keep in mind that you can only build two types of towns:
- either the town's original type
- or the town that is the starting town for your hero.
So, for example, if an Elven town was destroyed by the hero Solmyr, then you can build either an Elven town or a Magic Guild town.
Sincerely.
By the way, these spirits that you can buy in a ruined town are very cool. In battle, for example, they killed one Traglodyte, and the Traglodyte's health was transferred to the ghosts. You just need to be careful: ghosts are weak, and they can be easily killed. But overall, it's a great thing!!!