Gender
Sex is determined by the twenty-third pair of chromosomes (aptly referred to as the sex chromosomes). As an embryo, you received an X chromosome from your mother and either X or Y from your father, which determined your sex. Females have two X chromosomes and males have one X and one Y. It is our genes that define our gender, but it is our culture and social interactions that give meaning to our realized gender identity.
It's no secret that, in our culture, there are many perceived psychological differences between males and females. The foundation of gender roles (the norms set for males and females) are often laid down for us as newborns, when boys and girls are each assigned their respective masculine or feminine colors, clothes, and toys. Such trends can be seen throughout nearly every stage of growth and development. From toys to clothes to jobs to roles in the family - according to our culture, certain things are for males and others for females. This is what is known as a gender schema. These ideals are not set in stone. Nevertheless, they remain quite influential to one's sense of self.
Many psychologists use the social learning theory to explain how people grow up with an identity of gender; the theory may also help explain other influences, such as from peers and culture. The social learning theory states that we learn social behavior by observing and imitating and by being rewarded or punished. In other words, in this case, children often imitate the parent whose sex they share. Parents reinforce this behavior by rewarding Bobby for acting like daddy and punishing him for acting like mommy (“Boys aren't supposed to do that, only girls do.”).
Interactionism and Free Will
“Heredity deals the cards; environment plays the hand.” - Psychologist Charles L. Brewer, 1990.
By examining this, the tip of the research ice burg floating in a calming sea of debate, the facts start to become clear. Both nature and nurture are important in determining human behavior. Genetic predispositions, social experience, and our environment all give some insight into our shared human nature as well as our individual differences. Our shared biology enables our developed diversity (Buss, 1991).
This is the general dominant view now employed by scientists in varying fields of study. Sometimes known as interactionism, it emphasizes that nature and nurture work together throughout our lives to shape who we are, especially psychologically. As with most science, by beginning to find answers we have also found more questions.
Some people wonder where free will fits into the equation. If our behavior is determined by our genes, experiences, environment, or any combination of said factors, does that throw free will out of the window? To this, many scientists would probably reply that even if biology and culture completely determined our range of behavior, a mind capable of logic and reason still gives us the ability to choose whether to follow this behavior or not. Furthermore, it should be noted that a defining principal of interactionism is that no one thing directly causes any specific behavior. Therefore, deviation is almost always a possibility.
Conclusion
Human behavior is the product of both nature and nurture, but as humans we also have an enormous capacity to adapt to situations. The intertwining effects of experience, environment, and our genetic predisposition influence our behavior. This does not necessarily predict what every person will do in every situation. Some people choose celibacy in defiance of their genetic urge to reproduce. Some people show personal freedom by going against the norms of their culture and the pressure of their peers. Just as many different factors influence us, we retain the ability to influence many of those factors. We are both the products and creators of our world.