Oh boy. I do NOT miss high school in the least.
I got bullied a lot throughout school too. There was this hick kid who had a whole hillbilly posse, some fat Jewish kid who I think was 22 when he graduated, a mentally challenged kid who threatened to cut me in the bathroom and called me "twinkie..." I'ma just call them all Bob. Moral of the story, children are awful monsters (sorry everyone who's a child who's reading this)
On my senior class trip, we went to an amusement park. I was having a great time because I only hung out with my friends and all the "popular" kids all went off to be buttcanoes by themselves. I bought a pirate hat and a lightsaber because hell yeah. When we had to go back to the bus, Bob #2 started with me. He started making fun of my pirate hat and calling me a stupid kid and saying I'm dumb for wasting my money. I finally had enough. I stepped right up to him and said "Bob, shut the **** up." As most insulted school kids do, he puffed out his chest and tried looking tough. "What did you just say?" he asked, trying to intimidate me. "You heard me." I replied, and I got on the bus. Never had a problem with him since.
Now that's the easy type of bully. Bullies who just wanna feel powerful and are too cowardly to break the rules by fighting. There are some kids, though, that aren't afraid to go to detention or get an F. These are the ones you have to get creative with. Bob #1, hick Bob, was a fun bully to dispatch of. I was sorta fat back in high school, so he had plenty of fun reminding me of that fact. He got all his friends to be Class-1 buttcanoes to me, made a girl try to trick me into thinking she liked me, all sorts of mean crap. This kid was probably stronger than me and whenever I saw him, it was a class where he had all his friends and I had none, so I was outgunned, so to speak. I couldn't stand up to him like I did to Bob #2. Them being hicks though, I saw my opening. Bob #1 would buy skoal (chewing tobacco) from one of his friends on occasion in the locker room. He also "pen-capped" his locker (he put a pen cap in the lock so he didn't have to use the combination every time.) During gym, I faked an injury and went to the nurse. On my way, however, I had to change out of my gym clothes. I took this opportunity to leave an empty can of skoal from the parking lot in Bob's locker and an anonymous note on the gym teacher's office desk. He got suspended for 2 weeks. It felt good.
Unless you're insane and probably evil like I am, I don't recommend doing any of this. It worked great for me, but I'm not sure about your situation. My best advice is this: high school is stupid. It's a gathering of human beings who have not yet learned how to follow their moral compass. It's like an insane asylum, only with better snack options at lunch. When you graduate, it all ceases to matter. Just focus on getting good grades, good scholarships for college, and just being the best you can be. Ten years from now, you'll have a Master's degree and your bullies will be asking if you want a side of fries with your Big Mac.
P.S. Don't respond to their insults. Even if you have the best comeback or yo mama joke ever, it's just not worth it. They want your attention and if you cease to give them a reaction, they'll get bored of you. Something people say on the internet when someone is trolling is "gr8 b8 m8" (great bait, mate). It means that you see their trolling for obvious bait and you're not stupid enough to let it get to you. Something you could do is wear a whistle and blow it whenever you're being bullied. The loud and ridiculous sound should not only confuse the bullies, but also alert nearby teachers and staff.