Tell her in a way that is age appropiate.On a level she will understand. Like "Your mommy had some problems and it was best for you to stay with me" And then ask her if she has any questions.Don't give her details she couldn't understand.
I would answer her questions as she asks them and give her only as much information as it takes to satisfy her at that time. To give her more information than she needs or can process will be overwhelming to her.
I wouldn't say mommy has problems because then she will worry about her mom.....I would just say that mommy is on vacation with some friends...Tell her she is with you because you love spending time with her...
My mom dropped me and my sister off at my uncles(and his family) house for a summer and all we were told is...they wanted us to spend the summer because they loved us and our mom needed some vacation time. It was the best summer I ever had! I didn't know anything was going on until I was an adult and old enough to understand.