Robert Browning creates a complex character in his poem "My Last Duchess" by using a technique called "the dramatic monologue." In this, the character (in this case, the Duke) is allowed to speak for himself, allowing the audience to overhear the character's thoughts. Thus rather than simply describe the character from the outside, which can be one dimension, Browning allows layers of characters to emerge in the process of self-revelation.
The Duke, in giving the envoy a tour of his castle initially appears gracious and sophisticated, but gradually reveals that he is callous and possessive. The personality layers, in which we see his collecting of art objects to color his attitude towards his wife, whom he regarded as one more of his possessions are revealed first in the beginning, when he describes his deceased wife in terms that show no mourning for her death but merely aesthetic appreciation:
That's my last Duchess painted on the wall,
Looking as if she were alive. I call
That piece a wonder, now:
It comes to a climax when we discover the cause of her death.