The very worst thing you can do is ignore the problem. First off, educate yourself! (You're doing a great job so far!) As much information I have tried to include here, this page is just a start. A Bright Red Scream by Marilen Strong gives the voice of self-injurers as to why they do it, and Deb's "Secret Shame" site also gives a wonderful explanation as to the "who, what, and why" of it all. Her page for family and friends is especially thorough and informative.
Next: do not judge your friend or family member. That is the very last thing he or she needs. Self-injury might be scary to you, but it's probably just as scary for him or her. Think of it as being somewhat like another kind of "addiction": compulsive gambling, alcoholism, drug abuse, or eating disorders. Their "substance" is the pain and the injuries which they inflict on themself. Put in that kind of perspective, some friends and family members have an easier time understanding and relating to SI.
The best thing you can do for someone who self-injures to BE THERE for them. Set up a support system. Offer to let them page or call you if they get the urge to self-injure, if you feel like you can handle talking about it with them. You don't necessarily have to accept phone calls at three in the morning (though that would be nice), but let them know that they can e-mail you late at night or when you are not available to talk on the phone. In the meantime, encourage them to seek professional help from a psychiatrist or therapist who understands the problem and issues behind it (SI rarely occurs in a vacuum; many people who self-injure have deeper issues of which SI is only one symptom). It's sometimes a difficult balance between helping a friend and maintaining healthy boundaries, but in the long run it's best to do whatever makes you the most comfortable.