The IRS places these on larger balances to protect the interests of the United States in the same way that a bank will record a lien on a vehicle loan to protect their interests. These are usually done automatically by ACS (Automated Collection Services), or by local Revenue Officers. They remain until the debt is paid in full or canceled by the expiration of the 10 year statue of collections or an accepted Offer in Compromise. They are annoying, and will seriously hurt your credit. As a rule, if you set up an Installment Agreement with the IRS, a Lien is automatically recorded by the IRS. We have gotten Liens released, either fully or partially; but it's not easy or usual! Avoid them if you can in advance!
These are placed upon wages, bank accounts or financial accounts by the IRS after they have properly warned you in writing. Generally, if you set up an approved Installment Agreement, the IRS will not Levy. Usually, it's one or the other (Installment Agreement or Levy) unless you submit an Offer in Compromise, get placed into "Currently Not Collectible" status, or the IRS does not pursue collection activity for some other reason. Levies are very difficult to get removed. Usually you will have to do Financial Statements, show reasons of financial distress, or other lengthy discussions with the IRS. It can be done, however; and we do it regularly!