Many people frequently use racist comments, sometimes to the point that they don't even realize they are doing it. If you want to be considerate, seem more accepting of others, and stop offending people, removing racist comments from your vocabulary is a great way to do so.
Recognize the things you say that may be considered racist. Keep in mind that this will depend on your own race (sometimes people of the same race can say things to each other that would be offensive if coming from someone of a different race) and the people you are talking to. While some comments are universally considered offensive, others depend on the crowd's opinion.
Understand that once you've acknowledged any offensive things you say, consider how you would feel if you were on the receiving end of the comments. With that in mind, honestly ask yourself if you want to inflict those feelings on others.
Come up with alternative phrases/names to say (ideally these should have nothing to do with race) instead of the offensive ones. When using replacements, remember that they apply not only to speaking, but also to writing and thinking. Over time, you will become more used to the replacements and may even forget the original racist comments.
If you're not sure whether something you want to say is racist or not, just don't say it. Adding something racist to the conversation (even if you think it's entertaining) is not worth the risk.
Don't try to correct random people you overhear; some people actually have affectionate nicknames that may sound like racism to the general public. Don't try to be the "racism police"- it will just put you in awkward situations.