Generally, the message is, don't support or condone any inappropriate behaviour. If you see someone being treated inappropriately, here are three things you can do:
Stand apart - If faced with a "joke" or "funny remark" which demeans anyone, show you're not amused at the very least. Don't laugh - better still, show you think the humour is in bad taste, by saying so, by your expression, or by walking away.
Show solidarity - If someone is getting a hard time, show them (and those responsible) that you're with the victim, for example, by standing beside them, by standing up for them, or by speaking privately and supportively to them afterwards.
Get help- Speak in confidence to a manager, contact the Equal Opportunities Unit, a Harassment Advisor or a Trade Union Representative.
If you ARE a manager, remember it's part of your job to ensure that policy is followed and that everyone's dignity is respected.