Contact the U.S. State Department, and the appropriate embassy and consulate office (which represents the country you plan to visit) before you plan your trip. They will tell you for what period of time visas are required. A stay greater than 90 days, for example, often requires a visa. Down-loadable visa applications and instructions that are specific to a country can be obtained on embassy websites, though you'll be required to mail the hard copy of the completed application form to a designated consulate's office.
Gather the documents you need for the application. Keep in mind that many countries don't require visas for short visits. South Africa, for example, which will be a popular destination for the upcoming 2010 World Cup, does not require a U.S. citizens to obtain a visa if their stay is for 90 days or less, but if you are not a citizen but reside in the United States the requirement may be different. Also be mindful of the estimated processing time for a visa when booking your flight dates. The processing time frame in South Africa is five days.
Beware of any civil unrest, potential weather disasters and other safety issues in the country you plan to visit. The U.S. Department of State web regularly posts advisories and warnings on its web site and may caution Americans not to visit a certain country and advise U.S. citizens who are there to leave, especially in cases where the U.S. Embassy in that nation closes. U.S. citizens are also advised to register with the U.S. embassy in the country they're visiting, so the consulate knows where you are, and can contact you in an emergency and help you evacuate if need be.