Normally, the bankruptcy automatic stay goes into effect immediately upon filing the bankruptcy case. This automatic stay prevents most attempts to collect on debt and also is effective in stopping garnishments, frozen bank accounts, and harassing creditors.
Problems arise, though, if a person has repetitive bankruptcy filings. After the BAPCPA reforms to the Bankruptcy Code in 2005, the automatic stay can be treated differently if a person files bankruptcy in a repetitive fashion. If you've already filed one case and file a second within a year, the automatic stay is only "automatic" for 30 days. To extend the automatic stay at that point, you need to file a motion with the court before the 30 day period is over to prove that the second filing was done in good faith. In this motion, the debtor has the burden of proving that the second case is filed in good faith; essentially, that there is a legitimate, good reason that the second bankruptcy was needed.
If you are filing a third bankruptcy case within a year of two previous filings, there is no automatic stay. Again, you can attempt to bring a motion to reinstate the automatic stay just like the motion mentioned above, but this time it is much more difficult. There needs to be a compelling reason that the court believes sufficient to grant an automatic stay in that particular case. If there is no such reason, there will not be a stay granted. Of course, these matters almost require consultation of your bankruptcy attorney ahead of time.