I need help

I had what I thought was ovulation bleeding, but my right ovary and back still hurt. Then I masturbated to get the pain to stop and then I saw I was bleeding again. O.o I am freaking out.. And when I bled last time I masturbated before that. Can anyone help me out.