The answer is: all of the above.
Artistic creation is a very subjective process so that a writer can follow many paths when trying to add depth to a character. One can, like many used to do so during the 19th century (Balzac and Stendhal, for example), elaborate on the region from which the character comes so as to give background information on the character´s culture. One could also include dialogues between the character and others so as to give a clear image of the thought process of the character. Thirdly, one could include, which is normal practice, the conflicts that the character faces so as to show his moral fiber and determination. Finally, one could show or describe the kind of relationships that the character has with others so as to show his social stance and his interpersonal capabilities.