Psychogenic pain, a.k.a. persistent somatoform pain disorder and functional pain syndrome has been defined as physical pain that is caused, increased, or prolonged by mental, emotional, or behavioral factors.
It may be linked to stress, unexpressed emotional conflicts, psychosocial problems, or various mental disorders. It's often diagnosed when patients complain of persistent pain, but no evidence of physical tissue damage or malfunction can be found.
It's unknown how mental activity can cause real physical pain. It's also unknown why the syndrome has developed through evolution. Some theorists suggest that the pain could have arisen as a 'distraction' to keep emotional responses under control - though this is as yet unproven.
See : Wikipedia