Females typically have two of the same kind of sex chromosome (XX), and are called the homogametic sex. Males typically have two different kinds of sex chromosomes (XY), and are called the heterogametic sex.

In humans, the presence of the Y chromosome is responsible for triggering male development; in the absence of the Y chromosome, the fetus will undergo female development. More specifically, it is the SRY (a DNA-binding protein) gene located on the Y chromosome that is of importance to male differentiation. Variations to the sex gene karyotype could include rare disorders such as XX males (often due to translocation of the SRY gene to the X chromosome) or XY gonadal dysgenesis in people who are externally female (due to mutations in the SRY gene). In addition, other rare genetic variations such as Turners (XO) and Klinefelters (XXY) are seen as well.

More Info: en.wikipedia.org