Hearing hate speech or racism may shock and surprise us so much that we don't know how to react. A very smart friend suggested that simply responding with, "That is inappropriate." is often effective. It may lead to a discussion that everyone will learn from.
What is important is that we do speak up and defend equality and tolerance for all.
Ideas and examples