They are having serious problems with unresolved issues and don't know what to do with their feelings of frustration. The way they act out is seen as really disturbing by many people, so they are often further abused when they seek help (see the insensitive first answer to this question as an example of that abuse). I recommend talking to someone with professional training like a school counselor or your doctor. Talking to your friends and family may get you more reactions that show similar insensitivity and unawareness of what your going through. PLEASE Get help, it's easy to deal with if your in the care of someone who understands.
People who harm themselves are suffering from a serious psychological disorder which can be life-threatening. They need help, not condemnation, and not judgement. Please understand that, like other mental illnesses, it can be treated, with therapy, or medication, or both. Moreover, it doesn't occur because the sufferer is bad, or weak, or sinful. If you have never suffered from a mental illness, you have no experience from which to make judgement calls. What's needed in this instance is compassion, and caring, and tolerance.