You like most of your co-workers as they are polite, friendly, and helpful but there is that one guy that is so rude it makes you cringe every-time you have to deal with him. While we wish we had lovey dovey relationships with everyone there are just some people who live on a different planet of existence than the rest of us. Their ability to socialize and critically think about their behavior is seriously hampered.
You don't really have much of a choice because work is work and you need to make a living. That doesn't mean you don't have options. Sometimes nasty people act this way because they can. People don't check them on their behavior. Don't be afraid to let them know you expect to be treated in a certain manner. Just make sure you are professional in your conversation.
1.) When the person is rude, stop for a moment, and ask them to talk with you in a manner that is appropriate.
One you have attempted to work with them on a polite level and they are not willing to change their behavior you have the right to step up a little. Cut all conversation down to a minimum, don't talk to them at all unless it is business related, and keep conversation short. Don't be afraid to say, "I'm not hear to chit chat with you. I'm here to work. What do you do you need that is work related?".
2.) Cut down and minimize all conversations that are not work related. This should give them the hint your not their bouncing board.
If you have already asked politely, and then became more adamant that they should not talk to you unless it is work related, you may need to go to the next step. Start documenting their behavior, see if there are others who have experienced this behavior. Once you have enough information go to your boss and ask that the person be moved. These people usually treat multiple people that way.
3.) Document and make management aware. Ask to have the person moved or counseled.