There exists people who are so broken or lost that they seemingly can't help themselves but to attack you or someone you know, as if they feed off of it. On the deepest level they're lacking something, and choose to lash out at you either because they see you as having the thing that they lack, or because you in some way remind them of their own shortcomings or demons. I've seen people become so fixated on projecting their own negativity on someone else that they end up becoming obsessed -- it's as if they can't function without this toxic and neurotic obsession they have created. The sad thing is that oftentimes they don't even realize that they've trapped themselves in a kind of hell of their own design. They're caught in a perpetual cycle of hate, obsession, and reactivity that becomes their default setting, in a way. They need you to react to them so they can continue that parasitic cycle.
There was a time when I would be angry at people who do this, but now I just feel sorry for them. That isn't to excuse their actions, of course, but I imagine that they must be suffering so much - sometimes without even realizing the depths of their suffering. The best thing you can do is continue trying to be the best version of yourself in spite of these people. It's difficult if they're committing themselves to attacking you any chance they get, but you owe it to yourself not to feed that person's parasitic behavior by giving them the reaction they so desperately desire.