What should you do if your best friend starts hanging out with a bully?

Stay friends with them...

You just need to tell your friend how it is. Tell them how much of a... the bully is. Can't swear, but you get the idea.

When I was in school, I was friends with people who sometimes did pick on people, and I'd always tell them to stop. However it's different if it's a bit of banter, don't confuse this.