There was a whole crowd of girls there, some that we know of, and other unnamed girls that don't have enough of a significant role in the play for Miller to have even mentioned them. The girls that we do know, that are named, are Abby, Betty, Ruth, Mary Warren, Mercy Lewis, and Tituba.
Abby is there to attempt to kill off Elizabeth Proctor, so that she can then dance in and be John's wife. She is in love with John, they had an affair, and as a result, Abby envy's Elizabeth. So, she goes to the forest to create "a charm to kill Goody Proctor." Rather evil, if you ask me, and essentially, the only one in the play that can truly be accused of actually attempting a form of witchcraft, in addition to Goody Putnam, who asks Tituba to conjure the spirits of her dead children to discover who killed them.
Speaking of Tituba, she was there because Abby "begged" her to make a charm against Goody Proctor, and because Mrs. Putnam had asked her to try to speak to her dead children's spirits. She was just doing the bidding of other people. As a slave beholden to white masters, she probably feared the repercussions of saying no to these women.
Mary Warren was there because she's a follower. She wanted to be accepted, had no spine of her own, so went along for the ride in order to be included. This can also be said of Mercy Lewis, who Miller describes as a "fat, sly girl" who enjoys attention and probably doing something a bit edgy.
Betty, unfortunately, was probably just carried on the tide of Abby's strength; Abby is like a stronger, older sister to Betty, and through peer pressure and the sheer force of her will, Abby probably had Betty go along with her.
So, either through intentional purposes and ulterior motives, or through peer pressure and wanting to do something exciting, this group of girls gathered in the woods to dance, and that is where all of the trouble began. I hope that helped; good luck!