Human Sex Determination
A key determinant of sex in humans is the SRY (Sex determination Region of the Y chromosome) gene which codes for Testis Determining Factor (TDF). TDF is expressed early in development and triggers the development of testes. These in turn release testosterone, which signals the development of male secondary sexual characteristics. Therefore, the presence of a Y chromosome with the SDRY gene determines the development of male. In the absence of SRY, no TDF is expressed and thus testes development is not triggered. The lack of this initial development means that the cascade leading to the development of a male is not triggered and female development results.
Individuals who are XY but have a Y chromosome that lacks the SRY due to a deletion mutation will develop as females. The lack of a second X chromosome does have some minor phenotypic effects, as is the case in individuals with Turner syndrome (see the page on Aneuploidy).
You should also understand the effect of loss-of-function mutations (tfm) of the testosterone receptor, mutations that lead to testicular feminization. In an XY individual, SRY (assuming it is not deleted) is expressed and testosterone is produced. However, in order for testosterone to signal development it must be bound by a cell membrane receptor on the appropriate cells. It is this binding that triggers responses in the cells and these responses are necessary for the developmental effects of testosterone. This receptor is coded by an X-linked gene called Tfm. Loss-of-function mutations in this receptor, which are indicated by tfm, result in a receptor that cannot trigger a response to testosterone, either because it does not bind the hormone or it fails to respond. What results in an individual with tfm is that testes develop and testosterone is produced but the testosterone has no developmental effect. Therefore, the individual develops female secondary characteristics.