I've had teachers that really made me look forward to going to class, made me so excited about learning the material; and others, honestly not so much. If you're having trouble getting along with the teacher, follow these tips to make it better.
To start, I know it's hard, but try and remember that your teacher really is there to help you learn, and it shouldn't feel like they're against you. If you're confused by something in the class or by something in the curriculum, talk to your teacher about it. They probably won't be able to change it, but talking it through with them can help you understand why it's there, and what you can do.
If you really just can't stand your teacher and can't get along with them, try and see if you can separate them from the subject that they're teaching. So, if you really love history, but you can't stand your history teacher, really throw yourself into the material and see if you can get over it that way.
Finally, if you really feel like your teacher has just had it out for you since day one, see if you can prove them wrong. Show them what a great student you really are, by working extra hard and earning an awesome grade in that class.