Can F-1 students work during the semester? On campus, up to 20 hours a week
F-1 students may work on campus during their studies, up to 20 hours a week while school is in session; off-campus work needs separate authorisation.
On campus means on the campus itself, or at an off-campus site with an educational affiliation to the school; the bookstore and the cafeteria are the usual examples. You can apply up to 30 days before classes start, through your DSO, who issues a letter of approval, and getting paid requires a Social Security number, which you apply for with the I-20 and that letter.
Off campus there are three routes. After one full academic year, unforeseen economic hardship qualifies you to apply: the DSO recommends it in SEVIS and updates the I-20, you file Form I-765 with USCIS within 30 days, and work starts only once the employment authorisation document (I-766) arrives. CPT during the program and OPT after it are the other two, and both need approval first. Working without authorisation is a status violation, and it follows you into later visa applications and OPT.