The idea behind self-fulfilling prophecy (SFP) is very ancient (dating back to ancient Greece), although brought to the forefront by Robert Merton in 1948. SFP refers to "the process by which one's expectations about another person eventually lead the other person to behave in ways that confirm these expectations" (Week Three: Self-Fulfilling Prophecy).
According to psychology notes posted on the University of Michigan's website, there are four steps to the SFP:
1) person expects certain behaviors out of "target"; 2) person behaves in a way that will evoke the expected behavior in the target; 3) target behaves in the expected way; and 4) person sees behavior he or she predicted.
An example of SFP is as follows: You walk into class and notice a boy sitting by himself. You expect that he is shy because he is not talking to anyone. You do not talk to him because you think he is shy. His behavior proves him to be shy to you.
The example above illustrates how SFP shapes one's perception of others. Essentially, it follows the "judging a book by its cover" idea. As for how SFP shapes the one's perception of himself or herself, SFP helps (or harms) one's self concept. For example, if on the way to a new job you think that everyone will be nice and you will get along wonderfully, you are more likely to be warm and friendly (resulting in people being warm and friendly back). On the other hand, if you start the same job thinking that everyone will hate you, you will enter into the job closed off and cold (and people will act the same way in return).