Sexual harassment is illegal. You will find lots of helpful information on this website, and you may also want to take a look at Stanford's policy that specifically prohibits sexual harassment.
You may be concerned about retaliation if you talk to someone‑-particularly if the person causing the harassment is a supervisor, a teacher, or someone else who has power over you. Under no circumstances will Stanford allow reprisals against a person who in good faith reports or provides information about sexual harassment or behavior that might constitute sexual harassment.
On the other hand, intentionally making a false report or providing false information is grounds for discipline.
Speak up. If you can, tell the person to stop. State clearly and firmly that you want a particular behavior to cease. This is not a time to be polite or vague. Consider the possibility that the harasser may not realize that a particular behavior is offensive.
Get information and support. If you feel you cannot speak up, talk with one of Stanford’s resources for further help and guidance. These people can provide support and advice about Stanford's policy and procedures, and can help to resolve the problem.
If the message is to work, it must be a private communication between the persons involved, so don't send a copy to anyone else, but be sure to keep a copy for yourself. Typically, you won't have a response to your letter, but the troubling behavior will stop right away.