OH MY GAWD! I am so sorry. I am not sure that I have any valid advice, but there must be something that can be done about this. I mean, WHO is this child having sex with? If it's another minor, then his parents need to be contacted. At the very least, your granddaughter needs to receive counseling.
If this is an adult (even an 18-year-old) there are legal remedies.
Again, I am so sorry. I can't write too much more because I am torn between my sympathy for you and the girl and my pure fury at the thought that this is going on out there. It seems like childhood is a luxury these days, and it makes me worry for my own grandkids.
You and your granddaughter will definitely be in my thoughts and prayers.