If you’re a citizen of a foreign country, in most cases you’ll need a visa to enter the United States. Citizens of certain countries often do not need a visa (See Travel Without a Visa for more information).
A visa doesn’t permit entry to the U.S., however. A visa simply indicates that your application has been reviewed by a U.S. consular officer at an American embassy or consulate, and that the officer has determined you’re eligible to enter the country for a specific purpose. Consular affairs are the responsibility of the U.S. Department of State.
A visa allows you to travel to the United States as far as the Port of Entry (airport or land border crossing) and ask the immigration officer to allow you to enter the country. Only the immigration officer has the authority to permit you to enter the United States. He or she decides how long you can stay for any particular visit. Immigration matters are the responsibility of the U.S. Department of Homeland Security.
Immigrant visas are for people who intend to live permanently in the U.S.
Nonimmigrant visas are for people with permanent residence outside the U.S. but who wish to be in the U.S. on a temporary basis – for tourism, medical treatment, business, temporary work or study. For non-immigrant visas, here is information on the difference between the visa itself and the legal duration of stay: Duration & Extension of Stay in the U.S -How the Visa Expiration Date is Different