An automatic stay is an injunction imposed by the bankruptcy court that automatically stops lawsuits, foreclosures, garnishments, and all collection activity against the debtor the moment a bankruptcy petition is filed. There are some exceptions, but generally, if a creditor tries to collect a debt or take other action in violation of the Bankruptcy Code, they can be penalized.