Characters can represent forces of opposition which can sometimes be thematic.
For instance, the characters in Animal Farm are thematically oriented because the novel is an allegory exploring issues of governance, freedom, justice and power. Certain characters represent corruption and so help explore the theme of corruption. Other characters represent the trampled masses or powerlessness and so help explore the theme of power and powerlessness.
The use of characters to portray themes in stories is probably one of the easiest ways to personify themes--Good vs. Evil, Change is Inevitable, etc. Writers use characters to show readers the theme by direct and indirect characterization, how the character reacts or responds to the setting, other characters, their thoughts, etc. The writer must set up the characters as believable (credible) so that you can identify with or understand them. Once the reader becomes "attached" to the character, the rest of the work in portraying a theme is pretty simple. The character himself/herself will take the reader on the journey to discovering and understanding the lesson the author wants you to learn, which is THEME.
Characters and Theme are two of the traditional literary elements. Characters have conflicts. These conflicts drive plot. The way the author chooses to have this plot develop reflects why the author wrote the novel or short story. This "why" is, of course, the theme of the work.