If the tax lien is added to the property, it may follow the property.
You need to work with a title company that can help you clean the lien.
In Texas, almost all regula sales through title company closing and title company issure buyer a title insurance that clear such liens before closing.
But some auction sales may keep all liens. It is buyer's responsibility to review the title (if you do not know how, you should hire a real estate attorney to do so).
If you buy the property with mortgage, the lender attorney will review title, so no worry.
So get a title insurance is a simple way to cover any title problem.