In the case of most of the airlines that have shut down this past week (except) ATA, those airlines continued to operate their schedules for a set period after the announcement. Aloha preemptively announced the shut-down a few days before it happened. Champion has set a date. SkyBus finished their whole schedule for the rest of that day. ATA just shut down everything and only flew the flights that were still in the air - which I think was mostly the redeyes coming back to the mainland from Hawaii.
The one factor that sometimes impacts these sorts of decisions is international flights. Usually, when airlines know they are going to shut down, they cancel any flights going out of country to foreign countries, or preemptively bring planes already overseas back to the home country. The reason is that if an airline files for bankruptcy, the airline's assets can be repossessed by creditors in foreign countries as collateral to hold in lieu of payment for services, whereas within their home country, they generally receive some form of protection from this sort of immediate repossession of assets by creditors.
As for the crews, specifically, their fate is usually determined by the above. In some cases, they are stuck with the planes - wherever they end up. In other (most) cases, the airline itself arranges for their transportation home to their base. Aloha, for example, made arrangements ahead of time to get their crews on the mainland back to Honolulu. On the other hand, when TWA went bankrupt, some flight attendants showed up to hotels (one in Houston seems to come to mind) and were told, "either you pay with your own credit card, or you're not staying here" - which is strange, of course, as AMR had already given TWA money to operate at that point, and was covering its bills.
But still, it illustrates perfectly how once a company goes bankrupt, the situation can quickly deteriorate into an "all bets are off" situation where every vendor, supplier and creditor essentially reverts to acting purely in their interests, and screw everyone else.