When I am watching TV or walking in my house, she jumps up and bites me. I locked her in the cage as punishment. But after I release her, she is still doing the same thing. Why does she like biting people? What should I do?
I don't think it's a good idea to lock a cat in a cage as a form of discipline. For one thing, as long as the cat is in the cage, it's not free to take care of its own needs, such as drinking or using the litterbox, which could be harmful to the cat. For another thing, I don't think the cat will understand it as a punishment. Cats generally like small spaces, at least for short periods of time, and so it might not even be motivated to try to avoid being in the cage. Additionally, putting a cat into a cage takes a bit of time, and therefore probably won't be viewed as an immediate cause and effect relationship by the cat. It'll probably just seem to it like you've randomly put it in a cage for some reason.
My best guess given the details is that your cat is bored and attempting to initiate play, but inappropriately. If this is true, I would expect that trying to punish it by putting it in a cage would be even less effective, because it does nothing to help with the problem that the cat is bored. The cat will come out of the cage and still be bored. The better solution is to try to entertain your cat more, and redirect it to more appropriate forms of play.
Try to play with your cat regularly with a feather wand or laser pointer, so hopefully it will be tired out and not want to bite in the first place. Also try to pay attention to your cat, and if you notice it trying to stalk you, get out the feather wand or laser pointer, and play with it before it tries to actually bite you. I also recommend cat kicker toys, which are stuffed toys that are big enough the cat can wrap its arms around to wrestle. Some cats really like play wrestling, so it can also help to toss its kicker toy towards it when you notice it seems like it wants to wrestle.
The indoor cats usually like to play with moving objects. Its the sign that your cat wants to play with you. This can be the reason, that it is trying to catch you when you are walking etc.
@kai has already explained the reason, but I want to share some additional things which I have observed so far.
Keep some objects with you, and give those to your cat when its getting bored. You can use small balls, feather, catnip stick, shopper, crushed card etc. And try to play with it. She will surely like it.
If this issue will not be handled in time, then your cat may leads to misbehave in future, because you didn't attend it properly when it needs you, and it can be the cause to change its behavior. I have personally observe the same, but was unable to identify the reason on time. And I was too strict with it by providing it punishment (as you are doing now). But it leads her to be aggressive, and not responding on my voices.
Hope this will help you!