You don't have to rely on teachers to teach you stuff. If they are crappy then study the textbook, preferably with a few friends tutorial-style. Each take a few problems to do at night and study them hard and know how to do them inside out then teach your friends how to do them the next day, and they'll teach you the problems they studied. You can never really learn anything until you try to explain it to someone else.
This is in maths class, but in others, find out about the topic independently of school (go to the library, browse the net, etc) and prepare some really difficult questions for the teacher and ask them in front of all the class. Either the teacher will splutter and stammer because they don't know and it's great fun to make the teacher embarrassed (especially if you don't like them), or they will be able to answer, you'll learn something interesting, gain the teacher's respect and they'll give you proper attention from then on. (Eg in year 8 when we were learning about atoms in science class I asked why don't the electrons experience centripetal force and fly off [we had been learning about basic rotational physics before this]. The teacher had to go and research a good age-appropriate answer for me and come back the next day but I got some respect from her after that)
Bad schools and bad teachers are no excuse for finishing school yet remaining a dimwit. The only person that can learn for you is you. You'll only be a dimwit if you don't take the time now to be curious and learn.
Also if you are going on to university you need to learn how to work hard right now or you will struggle, even if you're very smart. You can't succeed unless you learn how to work.