I wrote once that I thought it was harder to be the people who help than the people who need help, and I still agree with that. You may be unsure of what to do and what not to do. You may think that people who need help are needy and whiny (and you'd probably be right, at least for some of the time).
If someone tells you that they hurt themselves, most likely they trust you. It would be in everyone's best interests if you didn't break that trust. If you don't want to have the emotional burden of helping someone, say so. Most people would rather be told, "I'd rather not talk about this" before they tell you pretty personal things about themselves. If you agree to listen, to help, draw boundaries for yourself. Don't put yourself in the position of a therapist. A person who is hurting themselves most likely knows the difference between a therapist and a friend and is, at the moment, looking for a friend. Don't put your friend above yourself. If you need a break, say so. If you don't want to talk about something, say so. If you think that your friend is depending on you too much, say so. Be honest. Just because someone is self-injuring, does not mean that that person needs to be protected.
If you think that someone is hurting themselves, but you haven't been told, you're in a tough spot, and I feel for you. I, personally, do not believe that anyone should be forced to talk or to get help. Let the person come to you. If they don't, they probably have reasons for doing so. Respect their boundaries. If you think that the person wants to talk about it but isn't sure whether you want to or not, and you do want to, you can bring it up by saying something like, "I'm always here for you, and I'd be happy to listen to you talk about anything going on in your life." Or whatever. Find your own words.
Here are some other things to think about...
Do:
Do not:
I know that these lists make everything seem clear-cut, when it's really not. Every situation is different. These are just some general things that usually do (or do not) work.