If you are applying for a nonimmigrant visa to the United States -- that is, a temporary visa for business, travel, study, medical treatment, or some other allowable reason -- you'll need to plan ahead to make sure the visa is ready in time for your trip. This typically involves:
Visas to legally enter the United States are processed through the State Department, via U.S. embassies and consulates around the world.
Note, however, that if you're from a country on the United States' list of "Visa Waiver" countries, you don't actually need a visa to come to the United States as a tourist for a brief (90-day) trip. You can simply travel on your passport and present yourself at a U.S. border, airport, or other entry point. To learn more about the Visa Waiver Program, and access the State Department's list of participating countries, go to the Visa Waiver section of the State Department's website.
There's no point in just showing up at a U.S. embassy or consulate expecting them to walk you through the visa application process. No matter what type of visa you're applying for, you're usually expected to bring some supporting documentation. For example:
Some of the above steps can require weeks or months of planning.
When ready to submit your application, you normally make an appointment at a U.S. consulate in your home country. To find out the exact procedures, check the website of your local U.S. consulate.
Then, to find out how long you will likely have to wait to get an interview there, go to the State Department's Web page on "Visa Wait Times." There, you'll be able to select your country from a drop-down menu and find out typical waits at that consulate for not only the interview, but for visa processing after the interview.
At your visa interview, you will meet with a U.S. consular officer and present your documentation. Don't expect a sit-down meeting -- it's more likely to be conducted through a glass window, and happen very quickly. Although the officer may give you a provisional okay, you're unlikely to receive your visa on the same day. First, your name will be run through various security checks.
Assuming you pass those, you'll be asked to return to the U.S. consulate to pick up your visa on another day. Unfortunately, however, if you have a common name, or if any questionable information arises, these security checks can take several weeks.
See this overview on consular processing for more on what to expect.
If you have any questions or concerns, be sure to discuss your options and opportunities with an experienced U.S. immigration attorney, ideally in the state where you plan to enter the United States. (Immigration law is federal, however, so an attorney in any state can give you general advice.) But if you have trouble at the airport or other entry point, it's handy to be able to call a local attorney for help.