It's a good question and it goes to the heart of painting and photography. On the simplest level it's about modelling of form as created by the fall of light. A standard professional portrait approach, which seeks to emphasize three-dimensionality, is to place the subject in strong unidirectional light against a very simple background which, being far enough behind the subject, is out of focus. The most famous example of this is probably Karsh's portrait of Churchill. Its success is dependent on the strong lighting, with a little light lifting the dark side of the face, too dark and fullness of form would be lost. Perhaps a small spotlight here and there, to lift a detail, a hand on a cane, for example, in the case of Karsh's Churchill picture, out of darkness. This gives another level of "coming-outness". With the figure fully formed, in focus and sharp, when it is then seen in full against the blurred background, there is yet another layer of "coming-outness" in the separation between the blur and sharp figure. So here there are at least three graphical layers working to give the illusion of three-dimensionality. It has a lot to do with how our eyes are trained to "read" three-dimensionality. Skilled photographers work consciously to exploit to the full our ability to read in this way. There is of course a limit to this, and it can only be so interesting. Painters like Braque and Picasso lost interest in this game, they turned to flatness of form and pure colour to give picture-making new vitality and interest.