When you want to establish a good relationship with a teacher you should be willing to pay interest in the subject that the teacher is dealing with. Not only paying interest but also being proactive about the topics that he is going to take up in his class.
When you like a subject the doubts arise in your mind about the different topics that you have learnt. Br yourself and open up to your teach about what you feel and what is it that you are stuck with.
Getting a teacher to like you may open an opportunity for your teacher to help you better grades. Perhaps you just want your teacher to cut you some slack? Maybe you want to be a bright spot in their day, without the stigma of being the teachers pet. You might also want them to like you so that you'll be noticed.
More than asking questions about the subject you might want to be good as a student. Teachers appreciate well behaved students and tend to have a corner side for them even if they mess up. Teachers will give you a second chance and would love to get to know you and help you improve. Most of the times you dont have to try to get the teacher to like you. It just happens. :)