When you travel outside of the U.S., make sure you do the following:
If you are traveling outside of the U.S. and your visa has expired
You will need a new visa. It is advised that you obtain your new visa in your home country. You should also contact the U.S. Embassy or Consulate in your home country to determine the exact procedure for you to obtain your new student visa. Remember to do the following in order to renew your F-1 or J-1 visa:
Traveling to Canada, Mexico or Contiguous Territories from the U.S.
If you are traveling to Canada, Mexico or territories contiguous to the U.S. for less than 30 days you do not need a new F-1 or J-1 visa. You do need to remember to have your immigration document signed (if the signature is more than 6 months old) and you should keep your I-94 card, if possible, when exiting the U.S. You must also bring your current passport when you travel. This applies only if you DO NOT intend to apply for a new visa while in Canada, Mexico or territories contiguous to the U.S.