The analysis of a character in a play can be examined in many different ways. First, this answer will show how an analysis can be completed. After a generalized analysis is defined, the answer will provide an example using a play.
General Character Analysis
A character can be analyzed in many different ways. One could examine the conflict a character faces (both internal and external) and how the conflict changes the character (of fails to change the character). Another way to analyze a character is to examine his or her characteristics (both internal and external). Once examined, the changes the character makes over the course of the play can be be contrasted with the initial characterization. One last way to analyze a character is to examine how the action of the play changes, or fails to change, the character. This can show the character to be weak, strong, defined, or changing.
In William Shakespeare's play Macbeth, the protagonist (Macbeth) undergoes a dramatic change. Macbeth, in the opening, is shown to be an honored man, true to his king (Duncan), and worthy of the praise of those around him. Initially, he is defined as a good person.
As the play moves forward, Macbeth's growing ambition forces him to change dramatically. He is no longer a true servant of the king. Instead, he murders Duncan in order to take the throne. Therefore, Macbeth's character changes from one of good to one of evil.
That said, he cannot be deemed as the only one responsible for his actions. The witches' prophecy forces Macbeth to take things into his own hands, but only after his wife pressures him to be a "man."
What this offers is a very defined characterization of Macbeth. Through analysis, one can define Macbeth as a man who is easily influenced by others, fearful of losing power, and overly concerned with how others look at him (especially his wife). He does not take kindly to being called a coward or to threats. This analysis is defined by looking at the conflicts he faces (both internal and external), the changes made in his behavior and mind, and the impact his own choices make upon his person.
The main things one should look at where completing a character analysis of a character in a play are the character's dialogue with other characters, the character's internal dialogue (made in asides), and how the character is defined by others (in dialogue where the character is not present).