One of the simplest defences to bullying is making sure kids have more then one circle of peers.
They have one at school, which is their primary one. It's one they spend 10 months of the year with, 5-days a week, 6.5 hours a day. If this circle turns toxic for them at all it can be easy for them to think it is them that is the problem, at least if it is the only circle of peers they are a part of.
Kids that participate in year round activities 2-3 times a week have a built in buffer. If school turns they have a place where they can fit in and be a part of a peer group that hasn't turned against them. This can help keep them from thinking they are the problem, and help them bounce back from things in other environments.
Confidence is really the key to beating bullying, both in the victim and the bully. Unfortunately confidence is sometimes slow to build and easy to destroy. Having more then one circle provides a safety net to bullying behaviour destroying confidence. Once that confidence starts to crack it is far easier to end up a target of bullying, or even becoming the bully in an attempt to rebuild it through knocking others down.