There is a difference between sex and gender. Sex identifies the biological make up and difference between the male and the female. Gender is constructed socially and identifies the relationship between men and women in the context of power relations. Gender is not natural or god-given, but is created by society through socialisation using institutions such as the family, the church and religion, school and education and the state and laws. Gender relations can therefore be changed by the very society that created them.
Gender roles exist in all spheres of society starting with the division of labour in the family.
For example, in the family, women are allocated the role of being child rearers and are given the duties of cleaning and cooking. In fact, women are allocated the tasks of domestic chores as if it were natural for them to have to do this. This work is hidden and not paid for. What this hidden, unpaid labour serves to do is prop up the capitalist economy. Workers can be paid less if they do not themselves have to pay for domestic work.