In short, someone else is appointed by the courts to make decisions. Their objective is to cover as much of the debt owing as possible, but without the crutch of being expected to cover all of the debt. Once creditors accept losses, it presents some options.
How that is done varies wildly by the specific situation. Sometimes it means selling the project as a whole to another developer, sometimes it means selling the pieces (I.e. land only, not contracted customers), sometimes it means firing and hiring different subcontractors, changing the scale of the project, and in some very rare cases they've even taken on more debt in order to accelerate the unchanged project under the original developer.
For the customer, more often than not the project is sold to a new developer. The new developer makes non-trivial changes to make the project financially viable. You, the customer, will be presented with the option of mutually cancelling your agreement OR signing a new purchase agreement (potentially for a higher price or different unit type).