HELP!! I don’t know what to do.

My boyfriend(22) and I(17) just got into a relationship 3 days ago and I knew there was something off about him but I overlooked it. We’ve known each other for years but not well until about a week ago when we started talking and being friends. I just found out that he beats his girlfriends really bad, like so bad that they go to the hospital, he does hard drugs, and goes to jail frequently. We’ve had sex a few times and my anxiety is killing me because we didn’t use protection. I want to get out of the relationship but I’m scared and I don’t know how to do it. I don’t want him to hurt me and I saw how bad he talked about his past girlfriends. I really like him but I won’t put up with the beating women and the drugs. How do I go about ending the relationship? Any advice helps.