That is a big question, and entire books are written on this subject. When we speak about literary analysis for academic purposes, we are speaking about understanding and discussing the literary elements of the work. There are many literary elements to notice in a literary text. Here are just a few examples:
Theme - Literature will always have at least one theme, an important idea that the author would like the reader to think about. In Huckleberry Finn, for instance, one theme is freedom, which is explored by looking at how Huck and Jim both on a journey to be free.
Symbolism - Are there any people or objects in the work that might represent an idea? One example is the kite in The Kite Runner, which symbolizes many ideas, one being the idea of hope.
Setting - Setting (time and place) is often discussed in literary analysis. We ask whether the setting is important to the story, for instance, and if it is, we can discuss why it is important. To use Huckleberry Finn as an example again, the setting is very important because it is the river that is supposed to carry Huck and Jim to freedom.
Those are just a few literary elements that can be analyzed and discussed. I am providing you with a link that will list many others.
When we analyze a literary work on a personal level, we ask what meaning the book has for the reader. Are there similarities between the life of the reader and the characters? Do they make good decisions that we should consider? Do they make bad decisions that we should avoid? Can we learn anything from the work about a different time or a different place?
Analysis of a literary work should be taking place on both levels, because both are part of the pleasure of reading.
I hope this helps. Good luck!