This article is from the FAQ, by with numerous contributions by others.
Any F-1 who is maintaining status may work on the schools campus for up to
20 hours/week during school and full-time during breaks. On-campus
employment may not displace US workers, but no proof of this is required.
The basic test is whether the position is traditionally filled by students
or workers. Most schools require you to receive authorization from your
foreign student advisor, but INS permission is not necessary.
For graduate students, on-campus employment includes employment by employers
off-campus which have an educational affiliation or research contract
relationship with your school.