Since everyone is different, it's no surprise that someone might not like you. There may be objective reasons for this, but often hostility can arise without any external reasons. Treat the presence of enemies philosophically and if you cannot avoid communicating with them, you should behave with ill-wishers in such a way that their destructive feelings of anger could not harm you.
The easiest way is when, feeling unfriendly attitude towards yourself, you can exclude contact with such people. But, unfortunately, this is not always possible. In the event that these ill-wishers work with you in the same team, the most correct thing is to inform them that this is not a secret for you. It is better to do this in front of everyone and in a joking tone. This will knock the cards out of the hands of enemies, since now their intrigues have a well-founded reason, which has become clear to everyone.
Be calm and give time for them to "get sick" with their anger and hatred. It also happens that this is a character trait and they just need to experience such feelings for someone. Not seeing you as a frightened victim, they can lose interest in your person and spill over to someone else.
Do not react painfully to the attacks of the ill-wisher, do not show that it is painful or unpleasant for you. Nothing affects people like your confidence and strength. Use your sense of humor, make the ill-wisher the subject of ridicule, so that he just begins to fear you. Find a weak spot and make it the target of your "harmless" teasing - they will start to bypass you.
Sometimes hostility is caused by complexes and self-doubt. Try to act "on the contrary" and, feeling the dislike of a colleague, on the contrary, begin to treat him emphatically politely, respectfully and kindly. Such people can be very vulnerable internally and your indifference can be interpreted as neglect. If they see that you treat them well, then their hatred will pass.
Try not to give a reason or become the target of self-hostility. Do not engage in intrigues, do not belong to any groups or spread gossip. Do your work conscientiously and efficiently, without shifting it onto the shoulders of others. Be polite to everyone, behave evenly and friendly towards everyone. Sane and adequate people will simply have no reason to feel anger and other negative emotions towards you.