Once the IRS files a federal tax lien, all other creditors or potential buyers have notice of the lien. If someone buys your home, they will be buying the home subject to the lien unless you are able to negotiate a lien discharge. If you attempt to refinance your home, you will run into difficulties because the lender will not want their lien to be in a junior position to the IRS tax lien.
The general rule for lien priority is “first in time, first in right”, so if your first mortgage was recorded prior to the recording of the IRS tax lien, the first mortgage lender retains their priority. However, if the loan were refinanced, the lender would lose priority and fall behind the IRS if the home was foreclosed upon and the funds were disbursed to lienholders.
The IRS could give up its priority—which is known as tax lien subordination—which would allow the new lender to take a senior position to the IRS lien. Unfortunately, the IRS is not going to make such a gesture out of goodwill alone. They are only going to subordinate their lien interest if you have something to offer them, which usually takes one of two forms.