When dealing with sexual harassment, there is no one best thing to do, because every situation is different. However, there are two important things to remember, as they affect your ability to pursue legal action should you decide to in the future.
Say no. One legal requirement for sexual harassment is that the conduct be unwelcome. Make sure the harasser knows that his or her conduct is unwelcome. Tell the person that his or her behavior offends you. Firmly refuse all invitations for dates or other personal inaction outside of work. Don't engage in sexual banter or flirt back in response, or otherwise send mixed signals. Direct communication, whether verbal or in writing, is better than ignoring the behavior and hoping it will go away.
Report harassment to your employer. It is very important that you report the harassment because your employer must know or have reason to know about the harassment in order to be legally responsible for a co-worker, client or customer's sexually harassing conduct. Tell your supervisor, your human resources department or some other department or person within your company who has the power to stop the harassment. It is best to notify them in writing, and to keep a copy of any written complaint you make to your employer. Describe the problem and how you want it fixed. This creates a written record of when you complained and what happened in response to it. If there is a policy employees are supposed to follow when reporting harassment, you should follow the policy to the fullest extent possible. While you may not think complaining will do any good, your company may later claim it would have stopped the harassment if it had known about it, so reporting the conduct is very important to show that the company was aware of the harassment.
Other strategies you may also want to try at this point:
Write it down. As soon as you experience the harassment, start writing down exactly what happened. Be as specific as possible: write down dates, places, times, and possible witnesses to what happened. If possible, ask coworkers to also write down what they saw or heard, especially if the same thing is happening to them. Others may read this written record at some point, so be as accurate and objective as possible. Do not keep the record at work, but at home or in some other safe place where you will have access to it in case something suddenly happens at work.
Keep your work records. A harasser may try to defend him or herself by attacking your job performance. Keep copies of any records of your work performance, including copies of your performance evaluations and any memoranda or letters documenting the quality of your work. If you do not have copies of relevant documents, try to gather them (by legitimate means only). In some states and/or according to company policy, you are allowed to review your personnel file, so you should review your file if that is allowed. You should either make copies of relevant documents or take detailed notes of what is in the file, if you are not allowed to copy the contents.
Talk to others. If you can do so safely, talk to other people at work about the harassment. You may find witnesses, allies, or others that have been harassed by the same person or who would be willing to help support you. Tell supportive friends, family members, and colleagues about the abuse. Telling others about the harassment not only can give you much needed support, but it can also be important evidence later.