Nothing. The way other people treat you, good or bad, is ALWAYS all about them, not you. You have zero control over how anyone treats you. But what you can control is your own time and attention. That's where your personal power lies, because nobody can take those things from you unless you give it to them. That makes your time and attention extremely valuable. You need to think of them as a gift, which you can give or not give to people as you choose.
So the solution is, exercise your personal power and stop giving your valuable time and attention to those assholes. They don't deserve the gift, and being around them is toxic to you. You're worth way more than what they see, and if they don't see your value, it's their loss. Not yours. From now on, cut all toxic people out of your life, and find others to hang with who will pull you up, not push you down. The world is full of both kinds, and a bunch more who don't care either way. You just need to seek out the good eggs.
You might not be able to do that overnight. It might take you weeks, months, or years if you're stuck with the toxics because they're in your family, school, job, etc. If that's the case, don't let it stop you, but you'll need a long term plan. Plot your escape, bide your time, and get out when the opportunity comes. Watch The Shawshank Redemption (1994 movie) if you want some inspiration.
Being happy and successful in life is all about controlling what you can control, and letting go of everything else.
Best of luck.