Bankruptcy protection usually begins and ends with the Automatic Stay. Basically when a person files for bankruptcy the automatic stay is the protection that automatically kicks in and prevents creditors from seizing property, collecting against judgments, garnishing wages, foreclosing on your house, etc. It is like an invisible force field that protects you from your creditors as long as it remains intact.
Your bankruptcy protection can quickly fade if a creditor files a Motion for Relief From the Automatic Stay. This is a simple motion wherein the bankruptcy court is asked for permission from a creditor to proceed with some sort of collection action notwithstanding you filed a bankruptcy. For example, in a chapter 7 bankruptcy you must be current with your mortgage in order to retain that property. If you are late and your file a chapter 7 bankruptcy then your mortgage lender will likely file a motion for relief from the automatic stay to continue with a foreclosure proceeding. They can do this because the bankruptcy rules require that you be current with all of your secured debts (i.e. a house) which you intend on retaining otherwise the lenders are allowed to take them back again. But before they can take them back they must ask the court for permission and cite the bankruptcy rule which allows them to do so. This process is all done in filing a motion for relief from the automatic stay.
Thus your bankruptcy protection begins with automatic stay when your case is filed and can quickly end if a creditor is successful in getting relief from the automatic stay. Its always good to seek out professional help to eliminate the potential mistakes in your case and to ensure that your bankruptcy is prepared properly.