Themes are extremely useful tools in writing. They can help a writer communicate with the reader, and help the writer create and explore realistic characters. Character motivations like family, revenge, love, justice or ambition recur throughout a story and provide themes. They can also be used consciously within a story, whether it's to signal a change to the reader or foreshadow a potential situation. Or, to drive the story forward.
For instance, characters often need a catalyst for a thought or an action. Say my character Julie is bored to death at work. She desperately wants to do something that actually requires the use of her brain cells, but that want isn't enough to make her quit her job all on its own. If it was, she would have quit already and there would be no story. And, because that's her motivation, it becomes a theme of the book. She'll always be referring back to it, and thinking about it, and wondering about the choices she made because of it. This repetition of idea creates the theme. Then I have to figure out how to communicate it--quickly and simply--to the reader.
Now, say Julie is walking down the street and she passes a pet shop window and stops. Inside is a gerbil, turning that wheel over and over and over. And she suddenly sees herself as the gerbil, running on a wheel of paperwork that never ends. The theme, as symbolized by the gerbil, can provide a moment of clarity for Julie, a catalyst for her decision to quit her job and head off to Costa Rica to work on a wildlife preserve.
Here the theme becomes part of the characterization of Julie. Bored, wanting more out of life. It also pushes the story forward, creating a catalyst for the change which begins the story. I could work it into the story in a hundred different ways from this point. I could take it further with the characterization by having Julie quit her job spouting phrases like, "I am not a gerbil, damn it," or "I'm getting off the wheel!" Or, since something extremely exciting is bound to happen to Julie in Costa Rica, I could make her overwhelmed by the change. She might yearn to be back on the wheel when the horrific and ancient monster is chasing her through the Costa Rican rainforest. Especially if it's a giant gerbil. (What? A gerbil the size of a house would be damn scary! :D )
The overall theme of the story might be anything from "The grass may be greener on the other side, but it might also be carnivorous," to "take hold of your life with both hands." Themes are flexible and the gerbil is just one representation of one perspective on the theme. They can be part of the plot, the characters, the setting. Every object and detail is an opportunity to strengthen your themes or explore them from a different angle.
How do you incorporate themes into your writing? Do you find yourself writing to the themes without conscious thought? When do you find yourself first noticing your themes?