Self harm at least to me is anything you do to yourself with the sole intention to feel pain. The reason me or someone else wants to feel pain is different, but a common reason is to feel good in the moment or just to feel something.
It's definitely weird to an outsider, but (using cutting as the sole example for this message) seeing one's blood and getting that temporary rush of euphoria provides relief to whatever is bothering someone. It's done for a reason.
The biggest problem for me is that I want people to know I'm "hurting", but I don't want people to know I'm hurting. I'm cut free for 5 years and still have scars on my arms and ankles I can't fully make go away (which a friend pointed at me for this January, thanks friend). I only stopped because they stopped bleeding out and I couldn't get the euphoria of seeing my own blood, and not because of some forced intervention or a change of mind. When people saw them when they were active, they reacted like I had hurt them instead of me hurting myself, and made me feel miserable about hurting myself, which, of course led me to hurting myself more.
It's hard being clean though, definitely have had urges to cut within the past 4 months. Currently trying to stay clean and avoid relapse because everyone around me thinks I'm doing okay again, plus summer coming up. I desperately want to get the relief back, but I will continue to fight to not fall back into it.
However, I'm inclined to say the obvious, self harm is not good at all. I wish it never had to be done and I will never encourage anyone to hurt themselves. But when I hear people doing it or did it, I completely understand. We're all hurting, and a lot of us just want to feel good again. It's best analyzed as a drug: It could kill when done too much or severely, you gotta hide the habit from everyone, and internally you know it's bad but you struggle to stop because it's a form of solace for the misery invading your mind.
Edit: My 69th post on SaSu is about self harm, nice.