Find someone you can trust - it's okay to ask for help
At school, the most important thing to do is have someone there you can trust (preferably an adult, but a classmate works, too). Oftentimes, the guidance counselor will be your best bet; they have to keep things confidential so you can trust they won't tell anyone about your BFRB. However, it can be very beneficial to have a great group of friends that you trust. If you tell them about your BFRB, you can always go to them for support and comfort.
Wear makeup to school
While this is not necessary, if you have visible damage from skin picking or hair pulling, wearing makeup can help relieve some of the stress you might feel about drawing attention to your BFRB. For example, if you pull your eyebrows, put eyebrow makeup on in the morning before you go to school. That will give you motivation to not pull in school, because if you pull, the makeup will come off and everyone will know something is "wrong." If you suffer from skin picking disorder or excoriation/dermatillomania, make sure to moisturize your face (or wherever you pick from) every morning to soothe the skin and reduce redness. If the areas where you pick from are noticeable, cover them with makeup so you will have motivation to not pick them (similar to the eyebrow makeup).
Bring fiddle toys (and get an accommodation for them if needed)
Fiddle toys can be a huge help and distract you from picking or pulling. Instead of giving in to the urge to pick or pull, play with a fidget toy instead (you can find some here). If you don't want them to be too noticeable, play with a smaller one, such as an edamame popper or a pencil grip. If your teacher sees you playing with a fidget toy and has a problem with it, talk to them in private and explain your situation. Make sure you tell them how the fiddles can keep you from pulling or picking and they should be fine with letting you use one in class. If you're nervous about telling your teacher in person, you can always write them an email or a letter explaining the situation.
Have a teacher pat you on the back or tap on your desk if they notice you pulling
If you feel comfortable telling your teacher about your BFRB, you can ask them to make you aware whenever you are picking or pulling in their class. You might ask your teacher to simply pat you on the back or give you a nod. If you don't feel comfortable talking to your teacher yourself, you can always ask a parent or the guidance counselor to talk to them for you.
Study in large groups
If you tend not to pull or pick when you're in front of other people, try to spend most of your time with a group of people. If you're stressed out about an upcoming test, study with your friends instead of by yourself. This way, you will avoid picking or pulling, especially during stressful times, which can be a big trigger.
Ask your guidance counselor to speak to your class
If your BFRB is noticeable (such as being bald), you can ask your guidance counselor to speak to your grade about your condition, and they can ask that the students not ask you about it. The guidance counselor should be able to explain it in medical terms and in such a way that the students will listen to them. Many students with BFRBs have done this and say it helped them tremendously.
Take care of yourself
Middle and high school is an extremely tough time and it can be very easy to get stressed out or caught up in schoolwork. But remember to take some time for yourself! Exercise is a great way to reduce urges and keep your body busy. If you come home from school stressed, put on your earbuds and go on a walk to reduce your stress. Also, make sure you are getting enough sleep. It is recommended that teenagers get at least eight hours of sleep each night. Finally, eat healthy! Have a good breakfast each morning, filled with protein (this can help if you pull/pick when you're hungry). And, don't forget to give yourself some "me time!"