Life does not come with a guarantee that you will never have to deal with unpleasant people or others who are difficult to get along with. You can not control other people, their words and actions are all their own. You can control your reactions to these people though. In this world there are people who are cruel, racist, ignorant, misguided, and even evil. As human beings we are exposed to the worst of humanity as well as the best. When you react in a negative way to others the only one you hurt is yourself. You can create stress for yourself and worry over what other people say or do, or you can take an approach that is healthier and control your reaction instead of letting it control you.
When you find yourself dealing with the unpleasant or negative words or actions of someone else remember to stay calm and rational. You will probably not change how the other person thinks or acts but you can change the way that you react to these individuals. Instead of becoming angry or reacting in a way that is negative be the bigger person and recognize that the individual is letting their biases and negative emotions rule their thoughts and actions. When you let yourself sink to their level you bring yourself down. By controlling your actions and being the level headed one in the situation you will be a winner no matter what the outcome may be. When you control your emotions and reactions you may even be able to have a positive influence, and the other person may begin to see the error of their ways.