Remind your friend that they haven't done anything to deserve this, and no matter what, they don't deserve to be treated this way. Deep down, they know this, but when they hear you say it, they may feel more at ease talking about it.
Ask your friend what they need, and help them to find a solution. Don't let them react aggressively toward whoever's targeting them, because that will just make things worse.