Uhm, it came as a compulsion, when I was maybe 9 or 10 (my puberty was slow but started early).
I think my first, first experience with it was when I was trying to get my glans out of my foreskin because a doctor was scaring my mother and I with talk of circumcision. I tried to get it out by repeatedly "slamming" it against its "limit", somewhat gently. Naturally it brought an erection, and such. That was maybe when I was 7 or 8.
Then the real first time I felt compelled to masturbate was in fourth (?) grade, as I said at first, when I was 9 or 10. It was really strong, and I really had to. I hid in the washroom and did it. It was the male way. Pumping. Oh gosh it felt awful. Even more awful when an annoying friend I had at the time (for the longest time I was only friends with those who would take anyone as friends - the rejects: the mentally challenged, the liars, the fat... in retrospective I think I sort of enjoyed feeling superior to them) caught me causing so much vibration in the stall, and I had to spend so much effort convincing him that I was trying to take a stain off. I would've never admitted it, then or later. Masturbation was always an enormous source of shame for me.
At some point, puberty entered stage two and the compulsion became very intense. At that point I started to use, uhm, material on the Internet. But at that point genital dysphoria had seriously kicked in, too, which made masturbation, which was never a remotely pleasant experience, worse than ever. So I almost always did it without ever removing my pants, so I wouldn't have to see it, and keeping the ejaculate in, so that I would feel less of the awful feeling of that stuff coming out. Honestly, in the beginning, I wasn't thinking I should have female genitals, just that I shouldn't have male ones. I was uhm... putting my hand around it and just closing my hand repeatedly. It felt less wrong that way. Still pretty wrong, though.
I never tried to do it like women do a lot, really, because doing that would require me to see and feel the thing a lot, which I didn't want at all. The only way I could remotely imagine something else was when I was just repeatedly closing my hand in my pants, never looking at anything but the screen. It was the only way I could get myself to a very unpleasant climax that would calm the thing down for a while.
Really, all I thought about was get rid of the arousal. It took hold of me like a demon, made me think horrible things and do very disgusting things at times. I just wasn't myself at all when it came. Ugh, I shiver just thinking about it.
Oh, actually, I just remembered. There was this awfully shameful episode when I was maybe 6, and watching TV on my mother's bed with my sister. Hidden under the blankets, I had undone my full-body pajamas and started to masturbate at some muscular character on the TV. Something like that, I think. Though it's pretty vague, and I'm not sure if it counts as masturbating, as children that young are prone to playing with their genitals just like that.
And that's it. This was probably my most embarrassing post ever.