The Pygmalion effect, Rosenthal effect, or more commonly known as the “teacher-expectancy effect” refers to situations in which students perform better than other students simply because they are expected to do so.
This effect is related to the Self fulfilling prophecy :
A self-fulfilling prophecy is a prediction that directly or indirectly causes itself to become true. […]
According to Wikipedia, it comes from the Thomas theorem which states that:
If men define situations as real, they are real in their consequences.
[…] According to Thomas, people do not react only to the situations they are in, but also, and often primarily, to the way they perceive the situations and to the meaning they assign to these situations. Therefore, their behavior is determined in part by their perception and the meaning they ascribe to the situations they are in, rather than by the situations themselves. Once people convince themselves that a situation really has a certain meaning, regardless of whether it actually does, they will take very real actions in consequence.
As Luca says, this can explain why some people seem quite unlucky in their relationships:
[…] what happens is that they are treated the way they expect to be treated. Who expects to be betrayed, will act leading his relationship exactly the way he would like to avoid.