Looking at a Quantcast report I see that they have metrics like women, male, children and different age groups, etc. How do they determine which visitor to the site is woman, male, child, old man, etc?
The approach Quantcast uses is called an "inference model". Quantcast uses an inference model to characterize audiences of nearly any size. Quantcast has NOT built its model on PII (personal identifiable information), but instead uses a large-scale mathematical model to infer demographics of visitors.
How inference modeling works is fairly well documented in literature on statistics. An example of an inference modeling technique would be Bayesian Inference.
DISCLAIMER: I work at Quantcast
A (very simplified) example for male/female:
500 website visitors prior surfed on Elle.com (tracked by Quantcast)
So mostly we have 1.500 female website visitors, 500 male visitors and 1.000 visitors (asumed 500 male and 500 female; if the demographics of their origin country is 50/50 with male/female).
This leads to the assumption, we have 2.000 females and 1.000 males in total.
Now, you just got to throw in some studies on demographics of internet usage, split it up with the traffic you know, calculate the traffic you don't know anything about and combine the numbers.
It's of course much more complicated than that, but basically that's how it's done ...