Gender is the attribute of being either male or female. Gender differs from sex in that while sex deals with the biological attributes of male and female, gender may be understood more as a cultural concept and a complex set of learned behaviors that is contingent not only on culture, but also on history. Gender roles and expecatations are always in flux and vary from one society to another and one time to another. Thus, the qualities and behaviors expected of women by a particular society at a particular historical time is called femininity; masculinity is what is expected of men in a particular cultural and historical setting.
An organism's sex category reflects its biological reproductive function rather than its sexuality or other behavior. The female sex is defined as the one which produces the larger gamete and which typically bears the offspring. In contrast, the male sex has a smaller gamete and rarely bears offspring. In some animals, sex may be assigned to specific structures rather than the entire organism. Earthworms, for example, are normally hermaphrodites.