As you go through life, no matter what you do, eventually you will meet someone who dislikes you. Even the most lovely and friendly person will be disliked by someone, sometimes with little or no true reason.
Some people project their own 'stuff' onto others, and will find reasons to dislike someone, and bring about drama and conflict where there is none. People are irrational and fickle and complicated.
I find this happens especially in the workplace because we are not always seeing the 'true' person, but their workplace personality. People can misunderstand/ misinterpret each other, take things personally when they are not meant that way, etc.
I would say, have a look at the reasons they might dislike you, decide whether you agree with them.
If you do, maybe there's something there for you to work on or talk to them about.
If you don't, then just say to yourself 'no one is everyone's cup of tea', continue being as polite to them as possible and move on with your life!
You can't win 'em all. Focus your energy on those people who see your value and make you feel good.
Of course, if they are actively being rude to you, harrassing or bullying you, then that needs to be escalated and discussed with your manager.