The role of the berdache in Indian societies is fascinating as a window on their views on sexuality and gender roles. In most cultures, the berdache could be either a man who took on a female gender role, or a woman who took on a male gender role, though the former seems to be perhaps five or ten times more common than the latter. For the purpose of this writeup and the sake of simplicity, I'll refer to individuals by their birth genders. Whether a berdache took on sexual partners of their own sex is a matter of considerable academic debate; there are records of female berdaches who reach the status of chief taking wives, but this may have been more of a status marker than a sexual choice.
The existence of berdaches seems to have been quite nearly universal among the tribes of the Great Plains and the Southwest, and extended with less frequency into the Pacific West. Berdaches usually rose to high status within their tribe or village; the craftworks of of male berdaches were valued highly, and female berdaches were said to excel as warriors. Furthermore, berdaches were highly valued as ritual particpants because of their liminal nature, which is to say, by straddling both genders, they took power from both. The kachina art of the Pueblo tribes reflects this, with the berdache kachina depicted as a powerful figure, split down the middle, with one side dressed as a woman and hold an ear of maize, the other dressed as a male and holding a bow and arrow (a bit like the Eagle in the Great Seal of the United States).
Among the Zuni, of whom I have the most complete knowledge, the process of becoming a berdache was an organic one. In the Zuni culture, children are dressed and treated the same regardless of gender until they are five or six years old; in fact, even their names are gramatically of neuter gender. Once they grow up a bit, they begin to dress a bit differently, and play with different toys; if a child shows an interest in the behavior of the other gender, the parents are expected to accept this behavior, and many in fact encourage it as a berdache in the family is likely to be nothing but an asset. If a child continues to show interests in the roles and behaviors of the opposite gender, they are taught the skills that would normally taught to that gender: a male would be taught to keep house, pound corn, and weave, a female would be taught how to hunt, maintain a farm, and knit (odd as it sounds to a Westerner, kniting is considered by the Zuni to be a masculine pursuit).
When berdache children reach adolescence, they are initiated into a mystery society appropriate to the gender they have chosen, and are accepted as full-fledged member of the opposite sex. Interestingly enough, once a berdache dies, they are a buried as a member of their biological gender, which they are believed to revert to at death.
Many Westerners who had close interactions with berdaches, even for a number of years, never figured out that they were born to the opposite sex. The prominent Zuni berdache We'wha even visited Washington, D.C. for six months in the 1890s, where he was celebreated in the papers as the visiting "Indian Princess". When Westerners did figure out what was going on, they were usually disgusted; the Spanish tried violently to wipe the practice out entirely, while the Americans usually confined themselves to angry mutterings about "Sodomites" and Indian barbarism.