Write an article based on this "Sit near the front of the class. Squeeze a stress ball or bring a fidget spinner. Change something up for a quick mental reboot. Take good (but entertaining) notes. Participate in class."
If your class has assigned seats, this may not be an option. But if you get to choose your seat each time you go to class, try picking one near the front. With your teacher that close to you, you might find it a little easier to pay attention. This might not be the most pleasant solution, but it can be really effective. If your class has assigned seating, ask your teacher after class about moving. Be upfront and tell them you want to move because you’re having trouble staying focused. Fidgeting and squeezing a ball might not sound very motivating right now, but give it a try! It actually helps a lot of people, because it gives them something to do with their hands while they sit in class. You can just squeeze it whenever you feel like it, or make it into a game.  For instance, you could squeeze the ball every time your Algebra teacher says “equation.” It's not the most thrilling game, but it will keep you tuned into the lecture! Some schools don't allow fidget spinners so find out your school's policy on them before bringing one in. Other great fidget devices include kneaded erasers and fidget boxes. The latter consists of a small cube, filled with buttons, switches, and scrolls. As soon as you start drifting off, make yourself do something small, like grab a new pen from your bag, do some neck rolls, or cross your other leg. These little actions may not seem like much, but they can help your brain reboot when you feel your concentration slipping. Even if the subject matter is boring, your notes don’t have to be! Try visual notetaking, which is basically drawing images and diagrams instead of writing words. Or you could take down notes in a humorous tone, like you were telling a story to your best friend rather than jotting down boring facts.  For example, say your teacher is droning on about Benjamin Franklin's exploration of electricity. Your notes could say: “So Ben got the bright idea to tie a metal key to a kite string. Then made his own son fly the kite in a thunderstorm! Poor kid was a sitting duck. He was allowed to stand in a doorway to stay dry while waiting to get zapped, so there’s that.” Taking entertaining notes may even help you remember the material better! It can be hard to pay attention in a boring class, but try to make yourself participate by asking and answering questions or joining in on group discussions. For example, challenge yourself to ask at least 3 questions or contribute 3 discussion statements per class. Not only will this help you focus on the lecture, but it may help you score a few extra participation points.