In secondary education and beyond, most essays that you write will ask you to analyze some aspect of literature. So, for example, your teacher may ask you to analyze the theme of a piece of literature or may ask you to discuss how the author's word choice contributes to the tone of a poem. In these essays, you should use what is referred to as the "literary present." This means that even if the story is written in past tense, you write about it in present tense.
That said, there are some exceptions to this rule. (It's English, after all, and there seems to be an exception for every rule, right?) If you are writing about action that occurred prior to the beginning of the story's plot (say, the death of Scout's mother in To Kill a Mockingbird), you'll write about that in past tense.
You'll also have to use some verbs in past tense for clarity. You may, for instance, write, "Scout realizes that Boo had protected her from Bob Ewell." It would be confusing and inaccurate to write, "Scout realizes that Boo protects her from Bob Ewell."
Historical works are a different story. Since they describe real events that are complete, most writers use past tense to discuss those completed events. So, for example, you may write, "In an attempt to produce an heir, Henry VIII gave orders for Queen Anne to be beheaded." History is complete. Changing that verb to "gives" would be awkward and would imply that it has yet to happen.
When in doubt, stick with literary present—or ask your instructor. And whichever tense you choose, be sure to use it consistently throughout your paper.