confused relationship

OK so I went over to my friends house a couple days ago and she invited a guy over and keep in mind she has a boyfriend, so the guy and I start flirting with each other and the relationship goes on from there and we do sexual stuff and all that and we been talking for a while and he's 20 and im 15. My friend is 19 and she's dating a 50 year old. So I get a text from her today saying that I need to leave him alone and if I don't I'm going to get them in trouble… I don't know what to do😪