What can you do if someone is generalizing and showing his/her prejudices?
You could question him/her asking to concretize and justify his/her statements. You could ask for example: How do you know this? Where did you find that information? You could confront him/her with facts, which contradict the prejudice. This presupposes, however, that you are informed yourself and the other is still open to arguments. Since this openness is not always the case, it is not always possible to convince the other. Nevertheless you can and should "say no".
What can you do if the prejudices and denigrations are aggressively expressed and you experience the other person as powerful?
This can create fear. Therefore you could ally yourself with others especially in group situations or in public. But aggression can also produce counter-aggression. So you should try to stay as calm as possible (e.g. without shouting) and at the same time to represent your position very decisively.
What can you do if the prejudices and denigrations are represented in a very plump way?
This might tempt you to become arrogant and to devalue or insult the other (who devalues other people). This makes him feel confirmed in his position. So you should reject the prejudice or the denigration clearly and unambiguously, without devaluing the other person himself.
Sometimes prejudices or denigrations make you feel violated in your own values (even if the prejudice or devaluation is about other people).
For an appropriate and clear reaction it is therefore helpful to know what is important and valuable to you. The better you know your own values, the better you can stand up for them!