As the embryo develops in the mother after fertilization, there is no differentiation of the sexes for the first six weeks. In the seventh or eighth week, the genetic males start developing testis in a region close to the adrenal glands inside the abdomen. The testis starts secreting hormones that cause the development of the male internal and external genitalia. In genetic females, the absence of Y chromosomes and lack of male hormones is responsible for the development of the female internal and external genitalia.
In addition to affecting the formation of genitalia, male hormones affect the brain and are responsible for the male pattern of sexual behavior and hormonal activity of the hypothalamus. In the absence of male hormones, female patterns develop.