The answer is simple as well, the estate uses the proceeds of the sale to pay off the liens. If the liens outweigh the value of the property, then you must either arrange for a short sale or find a buyer that is willing to purchase the property subject to the liens.
As stated, if the property is worth more than any mortgage on it (if any) along with the liens, then the proceeds will pay off the liens. Otherwise the estate must arrange for a short sale or find a buyer who's going to pay off the liens or take subject to the liens.