If you are having issues with your teachers try talking to them one on one. It will show them you have guts and they will respect you. If that doesn’t work go to an adult above them or equal to them, either your parents or the headmaster.
No one is perfect and even if you love your teachers and respect them, even they can make mistakes. So, instead of moping around, what you should do is confront the problem and communicate with your teachers.
You should also remember that YOU are not perfect and maybe the problem is that you are not being a good student. Talking in class and not paying attention will get you in trouble with your teacher. So be a good student and talk to your teachers if you feel that you are not being treated fairly.