Buying a house off the court house steps is risky business. You need to check the title before bidding to know that you will get clear title. You will still be responsible for unpaid county taxes. Also you have no right to go in the home before the foreclosure unless the owner invites you in. You could be getting a home that needs lots of repairs you have not budgeted for.
Im not an attorney but it depends on what lien is foreclosing, usually an IRS lien and property tax lien or prior recorded lien would still need to be satisfied or released.
I have seen examples where someone was thinking they were buying the first mortgage but in fact was a second and still had prior lien that would need to be satisfied or subordinated.