As a teacher, I tend to think that very few teachers are actually unfair, but students tend to think that any decision that negatively affects him/her is unfair, even if they've seen the same consequences given to several other students. Most teachers, myself included, work very hard to be fair and consistent. So my first suggestion is to reevaluate the situation and ask is it genuinely unfair, or is it just something you don't like?
However, there are always exceptions to the rule, and there are some teachers who really are unfair. If this teacher is truly unfair, your two main options are to either 1) just deal with it, or 2) suck up and try to become one of the students treated more favorably. If this is a severe case of injustice in the classroom, then you should contact the principal, dean, etc. and state the facts (no opinions) so they can help remedy the situation, but that should really only be done in the case of the teacher's unfairness hurting your grade or infringing on your rights. You might also want to try talking to your teacher either in person or in an email. If a teacher is approached with a comment like, "I'm sure you didn't intend to do this, but it really embarrassed me when you . . .", he or she will likely apologize (I don't think most teachers ever aim to embarrass students or hurt them in any way, though we all have different sensitivities, and so it happens), and prevent the situation from happening again.