Well, its quite normal that your city got destroyed without any warning because there is currently NO WARNING for when your city is about to come under attack.
Instead ... if you have units, a Tac Battle will randomly pop up ... and if u don't ur city will randomly be conquered/ destroyed.
What happens to your Conquered City
Personally I feel that If your city is taken over by Undead/ certain demons ... your city turns into a Necropolis
and if your city is taken over by Monsters/ certain demons ... your city turns into a Ruins/ Monster Haven.
And if your city is invaded by a simple animal (wolf, warg) ... then you might lose a building, and you lose at least 5 population (and your city is only destroyed if it has less than 5 population and no buildings).
If its taken over by Bandits/Thieves/ Rebels ... then it turns into an Independent City/ Minor Civ