Applicants for visas may apply only in the country of citizenship or current official residence. See this DOS announcement. Applying for a visa in a third country is no longer possible, unless your home country happens to be one that does not host a US Consulate.
The US Department of State, which manages all US Consulates, posts information about the wait to be scheduled for a visa interview here.
Every US Consulate has slightly different rules about visa processing, based on in-country business norms and other considerations. As a result, every US Consulate has webpage(s) about how they process visa applications. Most US Consulates utilize an independent company to schedule visa appointments and coordinate the intake of applications. You must check the details of the consulate where you plan to apply to confirm their process, requirements and timeline.
NOTE — If your field of study is technologically sensitive, such as nuclear physics, you may experience delays in getting your visa while a clearance is obtained from the State Department, called Administrative Processing. You will not be permitted to return to the U.S. while you wait for this clearance.
You will need the following to prepare your DS-160 Visa Application, and for the interview:
Once you have a valid visa in your passport, you no longer need the Form I-797 Approval Notice. You must return it to ISS to include in our files. Individuals are not permitted to retain their I-797 Notices; that notice is the property of Purdue University.
Citizens of Canada traveling on Canadian passports are not required to obtain a visa for admission to the U.S.
See Admission for a discussion of admission procedures.