Practically speaking, so long as you are current in your rent payments, you can continue to occupy an apartment as provided by your lease or by the common law of landlord-tenant relations. This may not be true if the lease has been terminated prior to bankruptcy. For a discussion on the effect of an automatic stay on a residential lease, click here. If your landlord was already in the process of evicting you and obtained a judgment of eviction, the landlord can proceed forward with the eviction. If you abuse the property or allow controlled substances to be possessed in your apartment, the landlord can also ask the bankruptcy court to lift the automatic stay and proceed with eviction proceedings.
Strictly speaking, an unexpired lease is an asset of your bankruptcy estate that usually has no value and that a Chapter 7 trustee would normally “reject.” Rejection is a technical breach of the lease that would allow the landlord to evict you. If you are worried about this happening, ask the trustee to formally “abandon” the lease so that you can formally affirm it.