Each state has homestead exemption and other exemptions that exempt certain property from being taken by creditors. The powers and rights of the IRS as a creditor, though far greater than most, if not all creditors, is still that of a creditor. Hence, the short answer is that yes the IRS could take your house in the sense that it could bring legal action to force a sale. However, that is not how the IRS works generally unless you owe plenty, like the late Sammy Davis Jr., Red Foxx, etc. There were entertainers who lost everything, including their homes to the IRS. What the IRS generally does however is place liens upon your house. This will cause difficulty when you go to refinance or sell. It will also screw your credit up pretty bad. So, the best way to deal with the IRS is to talk to them. You might want to seek the professional advice of a tax attorney or a tax CPA before doing so, or even give them power of attorney to discuss your situation with the IRS. Usually, the IRS is fairly reasonable and if handled properly, you can enter into an installment agreement to pay your taxes over time. Now this is a typical scenario. Your case may be different and you may need to have your tax returns evaluated for accuracy, missed tax opportunities and deductions, etc. You may also need to protect yourself if a Notice of Deficiency has been issued, which will only give you 90 days before the taxes are assessed (the last stage before the IRS starts looking for assets to take). There are Offers in Compromise that may be made on your behalf as well if there is something in your case that demonstrates the taxes sought were wrongfully assessed or that there is some likelihood, because of age, income or other restrictions, that the tax will never be paid. Consult a tax attorney or tax CPA (I use the term "tax CPA" because some CPAs don't know swat about taxes).
I applaud my above colleagues answer.
To reiterate, yes, the IRS can technically take your house away. However, the IRS only engages in such ridiculous behavior when the tax liability is similarly ridiculous in size. Typically, they will file a federal tax lien against you home, which acts as a second mortgage, preventing you from realizing the gain on the sale of the property without the IRS first receiving their take. The lien will stay in place until the liability is paid in full or it expires. Yes, that is right, IRS tax liabilities expire 10 years after they are assessed. However, the IRS can engage in other collection activity to make sure that the liability does get paid (i.e. levying your bank accounts, wages, etc.).
To also reiterate, yes, you can stop them. You can do this by negotiating a resolution to your tax liability. My colleague hits on a couple - Offer in Compromise (i.e. settlement) and Installment Agreement (i.e. monthly payment plan based upon income > expenses). However, there are additional forms of resolution given your financial situation (i.e. Currently Not Collectible status), liability amount/age (i.e. Streamlined Installment Agreement), and/or how the liability came about (i.e. Innocent/Injured Spouse). Once the resolution is negotiated, the IRS will stop engaging in collection practices - however, the federal tax lien may stay in place, depending upon the form of resolution. You should consult with an experienced Tax Attorney about finding the right resolution type for your situation.
The IRS cannot simply "claim" that you underpaid your taxes. The IRS must make an assessment, and then place a lien on your home. You have the right to contest the IRS's position. However, if you sit on your rights, ultimately the IRS can execute on its lien and force a sale of your home. Your state's homestead exemption is all that you will get back in the sale. For example, in California the homestead exemption might be $75,000. So if the home were sold for $175,000 (assuming no mortgage), the IRS would get $100,000 and you would get $75,000.