I don’t want to

Everytime I post on this app about my boyfriend everybody tells me to leave. I thought I had gotten stronger since my last relationship sucked and I had finally got over him and left and did what was best for me, but I came and got into a one sided relationship. I feel like he’s using me, when I don’t do something he likes he hits me. The only time we really get along is when we’re alone and about to have sex or already had sex. I know obviously i need to leave cause I feel dumb staying but how would I?