In a place called Salinas in the Dominican Republic, a strange thing happens to some girls as they enter puberty - they begin to grow penises. This is know as guevedoces, which translates roughly to balls at twelve (heuvos are eggs).
It's prevalent in Salinas, as many families carry a mutation of the gene that is responsible for 5α-reductase, the enzyme that converts testosterone (T) into 5α-dihydrotestosterone (DHT). DHT is a much more potent androgen (male sex hormone) than T, and is largely responsible for male sexual differentiation of the genitals in utero. It is also responsible for male pattern baldness and enlarged prostates. The drug finasteride (Proscar) inhibits conversion of T to DHT, which makes it effective in treating these problems.
During development of a male embryo, an absence of DHT due to a mutation of the gene responsible for 5α-reductase means that the genitals will remain female, or intersexed (all embryonic genital tissue comes from the same origins in males and females). However, at puberty, there is often a sufficient surge of T produced by the testes for male sexual differentiation to happen. This can account for females seemingly becoming male.
A recent article in the Washington Post describes this in more detail: link.