Usually I don't. It's their problem not mine. If it were someone that I liked or felt a possible friendship with I would.
I have had some people at work (customers, usually older folks) say things bad about my own ethnicity and I just ignore them.
I always speak up. This does not mean I always tell them what I am. When anti-Arab sentiment, anti-Hispanic, anti-Asian...well, anti-anyone for ethnicity or sexuality or gender, appear, I speak up and make clear that we are all equal from within. To ignore it, is to perpetuate. You do not have to say what your background is; but, it is a responsibility to fight prejudicial thoughts. Do I tell them I am an Iraqi by birth? Rarely at the start, about half of the time it will be revealed at some point. Usually in the manner of "You don't like Iraqis?" to which they respond that they do not, and then I mention they like me- it's hugely enjoyable to see them suddenly flummoxed! Do I shout them down when they make bigoted comments? Always. And it works in all directions as well- I have dealt with the 2 Lebanese businessmen who speak ill of women and of Americans. What frightens them most, is they know where I am from.
Now, clearly mem0101; it is a different scenario in business situations when dealing with a customer. It can be uncomfortable, and you need to decide what you are willing to accept. I have been in those sticky situations and those are the only times I have been tempted to hold my tongue- I was terminated from employment at least a few times for this disgraceful behavior (as a hotel desk clerk, it happened twice). On the good side, I have also been given compliments (though never a pay increase) from some employers. Eventually, I ended up working in accounting, where the attitudes are less likely to be brought in from a deep-money-lined-pockets outsider. If it happens within the workplace from another employee-or employer, I have legal rights. It is not in me to stay silent for any length of time, I did that too much as a child. In my literary career; I have been fortunate, as so far, none have crossed these lines.