The three main ways in which children become gender role socialized are at home (by their parents), at school (by teachers and peers), and through the media (which has become ever more important and ubiquitous in recent decades).
As soon as they are born, children are gender role socialized by their parents. Examples of this include giving children gender-specific names, buying them toys particularly associated with one gender (action figures and toy guns for boys, dolls and dollhouses for girls), and dressing them in clothes which signify their gender.
By the time they go to school, children are normally already socialized into one gender or the other. This process continues at school with peer groups consisting of members of the same gender, and with girls playing sports such as lacrosse and hockey, while boys play football and baseball. Teachers often contribute to this process, both informally and formally in the way they treat the children, often expecting boys to be better at the hard sciences, mathematics, and engineering, and the girls to excel in arts and languages.
The media constantly creates and reinforces gender socialization, with depictions of girls and women who are more passive than their male counterparts, and often judged largely on appearances. Although there have been attempts to challenge such stereotypes, many remain, and these may be all the more effective because the sexism is not overtly declared.