Property taxes are paid before any bank or any other lein holder.
Would also recommend that you consult with a good real estate attorney before doing anything with this transaction.
If you're the seller, you have to pay as soon as possible, of course. However, there is some time, unless an investor purchased your tax certificate.
If you're the buyer, when you close, the title co. or the Lender will pay off the property taxes from the proceeds of the sale, before the remainder funds are wired to the seller or the seller's lender.
It's good to have an attorney to protect your interests in a short sale or an REO (bank-owned).
If you are the buyer, just make sure you get clear title free of any liens and if paying all cash it's imperative you hire an attorney to review your Title Committment and closing documents to protect your interests. The tax lien should be paid in full at closing.