My friend is having sex

So let me just say this friend is 12 years old she turns 13 this month. She had a boyfriend a few months (he was like 14 or 15). She would tell me all the things they would. Like he would finger her and shit like that. I just want to know if that’s like even legal? Cause that’s a 12 year old girl and a 14 year old boy doing sexual stuff together