CPT vs OPT
CPT (Curricular Practical Training )
You can work (in CPT) after 9 months after entering US (i.e., after completing 2 semesters). You have to be enrolled in the school to get CPT. You need to get new SEVIS and permission from school (you can contact the department of international students/office for paperwork). It's better to make sure that company offering you internship is aware of some paperwork (minimal). It can be Co-op or Internship. You need to get CPT if you get an internship offer. You can get paid in CPT (remember to pay taxes). You should not work more than 12 months (full time) in CPT. If you do so, you may not get your OPT, and your OPT application will probably be denied. Most students work 11 months (max). Sometimes your OPT may get extended (you might need permission and SEVIS from your school for extension). Part-time CPT employment does not affect your eligibility for OPT. Some schools may allow CPT only after completion of one/two semesters. CPT can be P/T or full-time.
OPT (Optional Practical Training )
A student can work in OPT after graduating from school (completing all your course, if in case you have to defend your thesis or your courses are remaining you may not be eligible for OPT). You will have to apply to US Department of Immigration for approval to work in OPT. You will have to initiate this process approximately about 3 months before graduation as it can take time (you can get help in this process from international student's office of your university).
During that time you can visit your home country and come back (we will advise you to do this in the beginning (if you have a job offer) of OPT (international travel). USCIS has made the recommendation that you should have proof of employment upon re-entry to the US when you're in F-1 OPT status. OIS, therefore, does not recommend that you travel (including Canada) if you do not have employment. Once your OPT expires, you have 60 days to either continue with your F-1 status by enrolling in another F-1 program or leave the country. You will lose your status in the US if you don't have OPT started within 2 months grace period. You can work for anyone in OPT. Your job on OPT must be related to your course field. OPT is a great option that US govt. Provides to international students for finding jobs. It is typically given for a validity of 12 months.
OPT cannot be longer than 12 months (if the student does not qualify for an OPT extension).
STEM Degrees and OPT
With new OPT rules, if you belong to STEM Category you can get an extension for another 24 months (only if you are on regular OPT, your have STEM degree from accredited SEVP-certified institution, and your employer uses E-verify).
You get 12 months practical training for each higher degree you obtain. So if you do BS, then you will get 12 months, and if you do another degree (like MS), you will get it again.
F1 to H1B (Gap-extension)
H1B visa start date is Oct 1, it's possible you have an approved H1B starting in Oct 1st but your OPT etc is expired. You can apply for cap-gap extension (check USCIS website for latest information and eligibility)