A theme is a literary element. It describes the underlying message of the work. Sometimes this is a moral, like "hard work is always rewarded in the end". Sometimes it's not an ethical statement, but a piece of the author's world view.

Many people confuse the theme with the plot. However, the plot describes the surface level of the action, not the underlying ideas or meanings as the theme does.

See also