In a chapter 13 bankruptcy case, the case is typically closed shortly after the debtor completes their repayment plan and receives a discharge of their debts or shortly after their case is dismissed by the court if they are unable to successfully complete their plan.
Alternatively, in a chapter 7 case, the bankruptcy discharge normally automatically occurs 60 days from the date of the creditor’s meeting (a.k.a. the “341 meeting”).