Social comparison theory was coined by Leon Festinger in 1954. This theory illustrates how individuals compare themselves to others in order to evaluate themselves based upon how others appear to them. Essentially, this theory pits the individual against other individuals in regard to see how he or she "stacks up."
If one constantly believes that all others are doing better than he or she, his or her self-concept will be rather low. On the other hand, if the individual believes that he or she is doing just as good or better, his or her self-concept will be good.
As for how social comparison shapes one's perception of others, this can go two different ways as well. First, if one thinks that he or she is below others, he or she will think highly of the other people (normally). If the person thinks that he or she is equal to or above himself or herself, the person will look at others (sometimes) as below himself or herself. Remember, there are always exceptions to the "rules."