If you are immigrating to the U.S. from overseas, you will first interact with a U.S. consulate in your home country, which is run by the U.S. State Department (DOS). In the course of that process, you will be asked to pay various fees to the DOS.
As soon as you enter the U.S. with your immigrant visa, you become a U.S. permanent resident. However, a few more administrative steps need to be handled in getting you your actual green card. These are handled by an agency called U.S. Citizenship and Immigration services, or USCIS. Until now, USCIS has been unhappy that it couldn’t collect any money for its role in this process.
But as of February 1, 2013, immigrant visa entrants will need to pay a separate, additional fee straight to USCIS. (An exception is made for adoptive parents whose child will enter the U.S. under the orphan or Hague Convention process, however.) The initial amount set was $165 (but watch out for later fee increases). You will pay this after receiving your approved visa package from the consulate but before coming to the U.S., through the USCIS website.
See the “USCIS Immigrant Fee” page of the USCIS website for more information.