In my English exam, I have written the sentence:
There were always some people who judge the others by their appearance.
One of my friends said that I should use judged instead of judge since I am talking about past. Which one is the correct one?
Your friend is correct. judged is the correct verb form when you are talking about the past. If the sentence started with There are always some people..., then judge would be appropriate.
In this case, your friend is correct. However, verb-form need not be consistent across a sentence in all cases. For starters, even if a whole sentence is the in past, there are different ways of putting things in the past. Then the verb might shift to the progressive (judging) or even back into the bare infinitive (judge).
(Also, unless there's something in context that makes it right, the the on "the others" is extraneous and incorrect.)
"There were always some people who judged others by their appearance."
"There were always some people who were judging others by their appearance."
"There were always some people who would judge others by their appearance."