Just want to gently add that whether or not your child has been violated, it is important that sex isn't construed as a "bad" thing. The bigger & badder you make it, the worse your child will feel about it. If something inappropriate has happened to her, your best means of helping her is to restore a healthy attitude about the subject. You don't want her feeling bad about herself over it.
You should absolutely check into things. But what you've described doesn't necessarily mean she's been abused. The level she's taking it to is pretty basic, meaning she isn't showing signs of more advanced knowledge. Most kids can figure that much out just from tv, even a commercial.
It is a natural biological function after all. We are meant to figure it out in time. Also with our culture the way it is, if you really think on it, she could have gotten that level of information anywhere. I'm not saying don't worry, but definitely try to relax some. I agree with AnnieBrooke that extreme reactions will damage her almost as much as anything that may or may not have happened. Also it makes sex into this huge deal to her. You don't want that either. It should be presented as just another thing we do (when we're older and ready), not taboo.
Finally, I would say that if she is opening this box, you should guide her through it. Whether she was pushed to this point, or just found it on her on, letting her ask you questions about it may help it not be such a big deal. Also giving her some 6 yr old level advice/explanations should help. Let her know that that kind of activity is lovely when you are an adult but children's bodies are not ready for such things. Though it may totally disturb you, perhaps it's time to tell her a little more. The curiosity isn't going away so perhaps satisfying some of it will take some of the fascination away.
Also, if you really are concerned she's been hurt, ask a professional for some advice to give her in order to keep her safe. There are things children can learn to say that make them less of a target for predators. Each family is different so I would suggest you (without your daughter) going to a therapist/social worker and asking for advice on how to teach your child some safety measures just in case. Children are strong and can handle amazing things. I'm sure that your daughter will be just fine with a little guidance from her Mommy.
I dont understand after the first 'scare that they are still sleeping around each other ,one on the floor one on the bed ' if you had doubts why risk it, more supervision and no nights sleeping in the same house .
Gee, I wish you hadn't screamed and pleaded and panicked and scolded. She's never going to tell you anything again about this without what sounds like a justified fear of an explosive or hysterical reaction.
If you think you can hold it together to talk to your child calmly, at some point where you and she are just sitting on the sofa reading a book together or something like that, ask her to start at the beginning (the first incident) and tell you what happened. Take whatever she says calmly, quietly, and supportively. Then walk her through in time, and let her tell you in her own way all the parts of it and where the ideas came from to be poking around with or without underpants. (My first guess would be TV. Have the kids been allowed a lot of unsupervised television? Second guess would be someone at school laid out for her that these things happened but not too clearly, hence the instruction to "move around.")
If you don't think you can hold it together, go to a counselor yourself to work through your highly dramatic emotional reactions to all of this, so you CAN hold it together. Dragging your kid to the doctor and embarrassing her and scaring her are not going to do her a lot of good, and will probably also obliterate the chance that she will feel comfortable saying anything to anyone about anything.
I mean this seriously. As a mommy, you have got to learn control your own "stuff" and not to indulge in panic and drama. She is a little child and you are a grown-up, and if you are losing your head in an obvious way in front of her, she is going to be twice as scared, ashamed, or traumatized. It is your job as the parent to make her LESS scared, ashamed or traumatized, and in the process to encourage her to confide in you in hope that you will safely take care of her. Instead, she was treated to the spectacle of you with your head in a basket, punishing her for her logical reaction, which was to try to send your freaking out in some other direction besides at herself.
If you just don't think you can safely talk to her about it in a way that instills her confidence, seek out a professional therapist who deals with children. But be dead serious about finding a safe, low-key and non-authoritarian person, because your child will see this as sort of like the inquisition if you are not careful.