As a student on F-1 visa, there are multiple ways one can work. On campus of the university that they are enrolled into in any job. The hours must not collide with the enrolled classes. As an unpaid intern (volunteer). Or as a co-op for two semesters at the most, as full time and get paid.
From what I have read there are some rules on working time