Your lawyer responds to the buyer's requisitions, obtains a payout statement from your lender, and arranges for the mortgage to be discharged from title. Any other registered encumbrance, including a lien or an old undischarged charge, must also be cleared.
On a condominium sale, your lawyer coordinates delivery of the status certificate. A buyer takes the property as it is in most respects, but a seller cannot conceal a defect, and a known latent defect that makes the property dangerous or unfit to live in must be disclosed. A failure on either point can lead to a claim after closing.
On closing, your lawyer receives the funds, pays out the mortgage, the commission, and any liens, and releases the balance to you.