The Securities and Exchange Commission has published an overview discussing what often happens in a bankruptcy of a public company.  Written mainly for shareholders and bondholders, it contains a good general discussion of the topic.