A bankruptcy doesn't dismiss another legal action, like a judgment. But you can include the plaintiff's claim in your bankruptcy. The judge may allow this debt and discharge it along with all your other obligations.
The person/creditor that is owed money sues the debtor/borrower in the appropriate state court. If the plaintiff (person owed) wins the suit he or she will be awarded a writ of judgment. Be advised...