This is a great question! Literary analysis requires that you have the ability to make meaning of what you read, that you are able to look at the big picture in your reading and simultaneously be able to take note of details, and that you have a good grasp of all the literary concepts and terminology required to discuss the meaning you make. Doing a literary analysis is simply a fancy way of saying you are doing all of that, using the vocabulary of your discipline.
Let's talk about meaning. Before you can analyze anything, you must have some understanding of what it means. For literary analysis, you should read slowly and carefully, taking the time and trouble to understand what the author is telling you, looking up words you cannot figure out in context, or even looking up information about a setting, so you can understand the text better. If you are reading a book about a foreign country or an earlier era, for example, you could be lacking in knowledge that would help you understand what you are reading. If a novel has a blacksmith as a character, how much would any of us know about what a blacksmith does?
Beyond understanding the meaning of what you read, making meaning implies something more. As you read and when you are done reading, you need to think about what deeper meaning you are taking away with you. What lessons or messages are you getting from this piece of literature? A book might give you insight into human emotions such as love or hate or greed. A story might help you see the horrors of war. A poem might make you view nature in an entirely different way. True literature is going to allow you to see something about the world or about yourself that is powerful. You might gain a variety of insights from one literary text, or just one big insight. Now you are making meaning!
The meaning you make is what we call a theme. That is the big picture you have seen. To analyze the theme of a literary text is to examine all the details that have contributed to that theme. Every author is building his or her theme with carefully selected details, so that the reader can put them together and gain some understanding of something. You are going to take them apart, so that you can show how they support a theme or themes.
This is where your toolbox of literary concepts and terms comes into play. The author used the same concepts to build the big picture. A literary analysis focuses on the ways that the author built the theme, and writers use many tools and strategies to do this. It is up to you to gain some understanding of what they are and the effects they create, so you can explain and justify the meaning you have taken from the story.
The most important starting place to learn the vocabulary of your discipline is with the elements of literature. You cannot discuss literature properly unless you understand these. A story has a plot, a setting, which is time and place, and characters. It has a point of view, which is the how the story is narrated, perhaps in the first person, perhaps with what is called an omniscient narrator, who is not in the story at all, but reporting everything that happens in the story, including the thoughts characters have. Each of these elements contributes to the effect of the story. The author has chosen particular characters, has them do certain things and think certain thoughts, and placed them in a particular setting. A story that takes place in 1850 in England is going to be a very different kind of story from one that takes place in 2013 in Russia. A first person narrator tells a story that is not really the whole story, since you are getting everything filtered through the point of view of just one person. You must ask yourself how some or all of these elements are contributing to the theme of the story.
But the writer has more tricks up the sleeve. There are dozens of literary effects that writers use to achieve the results they want. For example, writers use symbols to convey their messages. A symbol is simply something used to represent something else. In The Great Gatsby, for instance, Fitzgerald uses a green light in the distance to represent Gatsby's yearning for Daisy Buchanan. In "The Lottery," Jackson uses a black box to represent death. Taking note of symbols that support a theme can be an important part of a literary analysis. Metaphor and simile are tools the writer uses. Again, in The Great Gatsby, we are told that Daisy's voice has "the sound of money." That is important, since it contributes to a message, a theme, that Fitzgerald wants the reader to take away. Authors' word choices are important. You might want to ask why a writer chooses one word as opposed to another. If a character is meant to be unlikable, she might be described as skinny. A likable character might be described as slender. There is alliteration, which is presenting a series of words that all begin with the same sound. Poets use this to great effect, to contribute to the feeling of a poem. So, you need to familiarize yourself with these literary effects. This enables you to understand how the writer has built up a theme or themes in the text.
When you put all of this together, you have the requisite skills to do a great literary analysis. Many students are intimidated by even the idea of writing a literary analysis, but all it is really about is being able to make meaning of what you read and understand how the author used the elements and effects that allowed you to make that meaning.
In order to analyze a literary work, you need to understand its literal meaning. Thus you need not just native or near native proficiency in the work's language but you also need the ability to process sophisticated syntax and vocabulary. You build these skills by reading sentences slowly and carefully, making sure that you are following what is happening in each clause, and looking up words with which you are unfamiliar in a dictionary; paper dictionaries work better than online ones as they won't lead you to get distracted by social media.
Next, you should understand the historical context of the literary work, by doing a small amount of background reading. A work written just after a major war or during some sort of social upheaval with reflect those circumstances. You should also be aware of the genre of the work and whether it is serious or satirical in intent.
Finally, you should look for specific literary techniques and devices. Start by identifying the narrative voice, or speaker of the work. In poetry, identify the metrical scheme, and various figures of speech.
The main skills involved in these tasks are the ability to do research and close reading, and the skill to concentrate on reading slowly, paying attention to all aspects of a work and how it is constructed rather than just skimming quickly and reading for content.