My brother is usually very nice to me, but sometimes he acts out. I can't be harsh with him because he is not a mature. He gets in a habit of throwing things.
What can I do to get him to stop throwing things?
Help him figure out why he throws things. Maybe he does that instead of hitting people, harming himself, etc.
Forget about the throwing itself and help him address the feelings that cause the throwing.
Offer an alternative to throwing things, like going for a long run together. Or, find a safer way for him to throw things — buy a couple baseball gloves and have a catch with him.
Find out if he sees agrees with you that his throwing things is a behavior that should change. Maybe he continues because he doesn't see it as a problem.
Realize that you might not be equipped to change his behavior all by yourself. If your parents or another more experienced adult is available, enlist their help.
Try not to take his behavior personally.