What to do if you are a witness to sexual harassment?
If you witness a situation which you consider sexual harassment:

Ask the person whom you think a victim whether she/he feels comfortable or whether she/he needs your help.
Express disapproval of the situation. It is usually difficult for the victim to oppose harassment. Therefore, it helps if you take a stand even if you are not directly affected by the situation. The victim will know she/he is not alone to defend their rights. This does not apply just to sexual harassment. For instance, when a teacher makes jokes demeaning minorities it is good to express disapproval as a member of the majority; when a teacher humiliates women in class, disagreement should be voiced also by a male student (and vice versa).
In case it is difficult to express disapproval or ask the victim during the incident, try to approach her/him later (after the class, exam etc.) and make sure they do not need help.
In case someone confided in you about being the victim of sexual harassment:

Assure the person that you believe them and that you appreciate they trust. Emphasize that the person is not guilty. Bear in mind that each person responds differently. While someone is able to give a rational account of events, someone else may be paralysed.
Ask the person whether she/he wants any help. You can offer them various possibilities to tackle the situation as mentioned above.
Suppress your curiosity. It may be beneficial to speak about the experience for some people, whereas it may be a trauma for others since they are forced to relive the situation.
Do not push them. A victim of sexual harassment is not obliged to deal with the situation or report it. She/he experienced a demanding experience that violated their personal integrity.
Do not do anything against the will of the person who confided in you.
How to act against harassment?
If we see a woman in trouble on the street, in a park or in a shop, we often don't know how to act or feel that someone else can solve the problem better. L'Oréal Paris, together with the Konsent, has come up with a guide on what to do if you notice inappropriate behaviour in public.
The effective 5D method helps to remove the barrier between the at-risk woman and the inattentive bystander. If you witness harassment, here's what to do:
1. Direct - Intervene directly
If the situation is not dangerous to you, approach the perpetrator. Ask him to stop his behaviour. Sometimes you just need to stand silently next to the perpetrators.
2. Distract - Jump the perpetrator
Distract the offender. For example, try dropping something "accidentally" to create a commotion or ask a simple question about the road or the nearest ATM.
3. Delegate - Call for help
Probably the easiest way to deal with the situation is to reach out to people in the area. Ideally someone who is an authority figure in the situation - e.g. a bus driver, security guard or even the police if necessary.
4. Document - Document the incident
If you film the situation, ask the harassed person how they want the footage handled. Never post it online.
5. Delay - Change the subject, postpone for later
Even after the incident is over, reach out to the harasser and show her that you are on her side and she has nothing to worry about. Offer to accompany her or even just be present.
An important aspect from the perspective of the 5D method is to intervene with respect for the victim, i.e. in such a way that the possible intervention does not make the victim even more uncomfortable. The idea is to react in a non-confrontational way and at the same time in the most effective way.
Project StandUp against street harassment
Harassment in public is an experience that devalues women and men of all sexual orientations, cultures and religions, and makes them doubt their own experience.
If we observe harassment without intervening, we deepen the trauma experienced by the person subjected to harassment and at the same time reinforce the perpetrator's idea that his behaviour is okay. Step by step, reaction by reaction, we want to break this inertia.
The StandUp Project offers digital training that can help you learn what to do if you witness harassment in public.