Is she really my friend?

So there's this girl at my school. while we're at school she's kinda mean to me. I mean "mean" like insulting me as a joke, but she also insults me for no reason and when I ask her not to she calls me weak. She also insists I do everything the way she wants me to do it at school. So if she thinks I'm doing something the wrong way, she yells at me telling me how she thinks it should be done. However, when we're not at school, shes completely different. She doesn't yell at me or insult me, she's pretty nice. I go to her house a lot, and have sleepover, and we go shopping together. But when I think about the way she treats me at school, I wonder if she's really my friend. What should I do?