After hearing the news about Detroit, my first thought is: "how does a city go bankrupt?"

If anyone knows, how exactly does a city declare bankruptcy? I mean its not a person a city is a thing is it not? I really hope Detroit comes back I hate to see any city have problems. I live in Indianapolis and my city is dealing with some summer violence issues, and I certainly hope we get things turned around. Like wise I hope Detroit comes back even stronger than before some day.