When you write a character analysis, the first thing is to make sure you adhere to the format (if any) that your teacher asked you to follow. For example, your teacher may simply want you to answer specific questions about a character without going into too much detail.
But if there's no format to follow, you can start with a few important facts about the character that influence her development, such as where she grew up and/or lives, the type of people her parents were/are, if she has siblings, and so on. For example, a character born and raised in the big city will be quite different from someone from a rural area. Or a character whose parents died when she was young will have a different outlook on life than someone whose parents are still alive.
Use these facts to draw conclusions about the type of person the character is, and how his background influences his actions in the story. For example, a character who grew up in the country as an only child and didn't have many friends may be shy, reserved, afraid to take risks, and may have a difficult time adjusting to a sudden move to the big city, and may even resist such a move. Or a character who lost his parents early in life and went from one foster home to another may grow up to be a very independent, self-reliant person, for whom a move to the big city would be a welcome challenge.
Also, show how the events of the story influence the development of the character — that is, how what happens in the story takes the character from the way she is at the beginning of the story to the way she is at the end of the story. This is also called the character's arc. For instance, that independent, self-reliant character who moves to the big city may encounter difficulties that shake her confidence, and life in the big city suddenly becomes a struggle. If she can overcome those struggles by the end of the story, she becomes even stronger than at the beginning of the story.
When you're done with your character analysis, you should have a fairly complete portrait of who he was before the story began and how he changed during the story to become the person he is at the end of the story.