Be sure to allow enough time!
Start to fill out the visa application as soon as your university issues the Form I-20 - and then schedule the embassy interview. The average visa processing time following a successful interview is 5 days, but it could be longer, so don’t leave this as a last minute project.
Some visa applicants, fewer than 2% of the total applying, must wait for Washington to complete an interagency security advisory review, which includes checking all appropriate records. More than 90% of those reviews are completed in less than three weeks.
As there are often changes in the procedure, it is best before attending the interview to visit the US embassy’s website for the most current information.
Once the F-1 visa is issued, you may travel to the States, but no earlier than thirty days before your course begins. In the subsequent years of the degree, should you leave the US for a holiday, you will not need to wait until thirty days before the term starts to re-enter. The visa will last for the duration of your studies if there is no deviation.
You will be permitted to work on campus or off campus (after completion of your first year of study) under limited circumstances. Generally, during term times, you are allowed to work for twenty hours per week, but during holidays full time work is possible. (See Working On and Off Campus)
Finally, when you have completed your studies, you will be permitted to remain in the US for up to sixty days. However, there is the possibility of extending your stay for up to twelve months following your degree to pursue practical training. For further information regarding working during your degree or training after its completion, please contact your university.
Note: At time of writing, the situation for international students is in flux due to newly-elected President Trump's unclear policy on immigration. Keep an eye on this website and that of the US State Department (and, of course, the news).