If you are filing Chapter 7 bankruptcy and your lease has not yet terminated, then you essentially have two major options: you can resume or reject the lease within 60 days of filing. If you aren't certain exactly what you want to do within 60 days, you may also ask for an extension.
Legally, during this time the landlord is forbidden to terminate a lease because of bankruptcy. He also cannot change the conditions of the lease in his favor, such as by increasing the rent or asking for a more of a security deposit because of the bankruptcy. The landlord does, however, have the opportunity to speak if you are including your unpaid rent in your bankruptcy filing. He will generally receive notice of your intent and will be able to come to the meeting of creditors, state his position and explain how you not paying the rent will cause a financial burden.
In a Chapter 7 bankruptcy, generally a trustee is appointed by the court in order to liquidate all the assets of the debtor. The money generated from this liquidation is then used to repay any debts owed to the extent possible, although it is unlikely that everything will end up being paid. Once the assets are distributed, remaining eligible debts are forgiven.
Claims made against the debtor before bankruptcy was filed are called pre-petition claims. Any rent not paid before filing is considered a pre-petition claim. However, if the tenant continues to stay on the premises after filing bankruptcy, then any subsequent claims are considered post-petition claims.
If you are confused about this, or any other aspect of bankruptcy law, consulting with a lawyer is usually a good idea.