Caption: "Allegory on the Theme of Prudence" by the Italian painter Titian (1490-1576)
Theme is the key to understanding a story or poem. Theme is the "big idea" the author wants you, the reader, to understand. The theme of a story is usually the author's purpose for writing the story. Not every good book has a theme. Some books are meant to be read just for the enjoyment of a good story. But most writers have a theme they want the reader to understand. It's not the action in the story. It is the readers' interpretation of the purpose of the action. It may be stated openly in the book, or the reader may have to infer the theme.
One word is not enough to describe a theme. Themes usually must be stated in a sentence or at least several words. For example, "friendship" does not convey an entire idea and so would not be a theme. But "Friends are a person's most valuable possession" would be a theme. Or, "Friends can only be trusted as long as their goals are the same as yours."