The IRS took money out of my bank account or paycheck. Why did this happen and what can I do about it?

That's intense to say the least! What has happened is a levy. The are several possible reasons why your case got to this point. Among the common ones are that you may have missed several deadlines; or you may have not followed up on required commitments; or you violated the terms of an installment agreement; or you did not respond to a series of collection notices.

Before IRS can levy they must file a lien. Liens and levies can be confusing. Like the lyrics from a 1950s song, you can't have one without the other. The following is an explanation to help you understand the connection and the difference.

Liens
A lien gives the IRS a legal claim to any property you own. Examples of property are real estate, bank accounts, retirement accounts, vehicles, and wages and money your employer, customers and other people owe you.

If you don't pay your taxes within 10 days after filing your tax return, a lien simply comes into existence by law.   If the amount of the back taxes is large enough, the IRS can file a notice of federal tax lien with the public official responsible for maintaining public records, often known as the county clerk or recorder. Once the notice of federal tax lien has been filed, the back taxes you owe become public record. If you want to sell your home, for example, the purchaser or or their lender will become aware of the lien; and, you will have to pay off the debt before your sale can go through. It even can cause a lender to refuse to make the loan. Note: The credit reporting companies do not record tax liens, so they do not affect your credit score.
The IRS will send a copy of the notice of lien to your last known address. So it is important to keep the IRS advised of address changes using their specified procedures.
Levies

After a lien comes into existence, the IRS is allowed to seize your property by giving yo 30 days notice by Certified Mail. This is called a levy. The most common levies involve bank accounts, wages and Social Security Benefits.

Bank levies. The IRS notifies all of the banks in which they believe you have accounts to freeze the amount of money in your accounts up to the amount of the back taxes as of the date the bank receives the notice of levy. You may or may not receive a copy of that notice; and, your bank may or may not advise you that they have received a levy notice. You may suddenly discover what has happened when your account is overdrawn or payments are refused by your bank. 

The bank must hold the money for 21 days before they send it to the IRS. This gives you time to contact the IRS and work out a resolution of the debt making it important to contact them by phone or in person as soon as possible and before the 21-days expires. (Anything you mail will almost certainly not get their attention before the 21 days is up.) Note: Bank levies are a one-time action which means that once the account balance has been frozen, any deposits made after that will not be affected by the levy. In extreme cases the IRS will send a levy notice every day.

Wage and retirement benefit levies The IRS notifies your employer or retirement plan administrator to begin withholding all of your wages except for a small portion starting with the next pay check. The percentage is determined from a chart that determines how much take-home pay you are allowed to receive. Unlike bank levies, wage levies are continuous until the IRS notifies your employer or retirement plan administrator to stop.  

Social Security benefit levies. The law allows the IRS to levy 15% of Social Security benefits under a federal government procedure where the IRS automatically notifies the Social Security Administration. In addition, an IRS employee can order a levy of up to 100% of Social Security benefits. Like wage levies, these are continuous until the IRS notifies the Social Security Administration to stop.

What does all of this add up to? A lien says the IRS can seize your property and a levy says they are seizing your property.

Also read What does resolving a tax debt mean?