If someone at your job has been sexually harassing you, you must go through the proper channels to report the offender. Most often you will find a procedure for reporting sexual harassment in your employee manual.
Reporting generally means that you must notify your supervisor, manager, or even higher-up management in addition to the human resources department. Once notified, you must give the employer sufficient time to conduct an investigation of your complaint. Each instance of sexual harassment must be reported in this manner.
If your employer is unable or unwilling to stop the sexual harassment or relocate you to a place where you will not be subject to this behavior, then you may consider quitting due to sexual harassment. If you do quit, make sure that you have notified your employer in writing that you are leaving the company due to the sexual harassment and its inability or unwillingness to put a stop to it.