The primary function of these "medicine men" (who are not always male) is to secure the help of the spirit world, including the Great Spirit (Wakan Tanka in the language of the Lakota Sioux), for the benefit of the community. They go into what Carlos Castanada evocatively called "a separate reality" to communicate with the denizens of this spirit world and to secure thereby the aid and/or information needed by the community when it faces some critical challenge that goes beyond its own natural resources.
Sometimes the help sought can be for the sake of healing disease, sometimes it can be for the sake of healing the psyche, sometimes the goal is to promote harmony between human groups or between humans and nature. So the term "medicine man" is not entirely inappropriate, but it greatly oversimplifies and also skews the depiction of the people whose role in society complements that of the chief. These people are not the Native American equivalent of the Chinese "barefoot doctors", herbalists, or of the emergency medical technicians who ride our rescue vehicles.
To be recognized as the one who performs this function of bridging between the natural world and the spiritual world for the benefit of the community, an individual must be validated in his role by that community. The Native American tradition has much in common with the world-wide religious practice called shamanism, and many students of this phenomenon believe that Native American cultures share this cultural feature as well as other cultural features with the people living on the other side of the Bering Strait. There are many indications from both archaeology and anthropology that the shamanic form of religious experience dates all the way back to the paleolithic hunter-gather societies.
Entering into the "separate reality" involves what the Western world would call a trance state. In childhood or adolescence, some individuals manifest signs of a facility for this kind of activity. Their community may encourage them to take special spiritual instruction from the current "medicine man" so that he will have a helper and eventually a replacement. Various hallucinogenic agents may be used to help in the case of individuals who are not so constitutionally gifted. Drummming and other such sensory inputs also may be used to help induce trance, or, from the standpoint of the "medicine man", to enter the spirit world. In many communities, the position of "medicine man" is passed down from father to son. In the more general religious and social phenomenon called shamanism, there are strong indications that the earliest shamans may have been women, so it is not unthinkable that a female human being could perform this religious and social function.
One of the best sources of information on this subject is the story of a Lakota (Sioux) wicasa wakan ("medicine man") recorded in a book produced with his cooperation called Lame Deer, Seeker of Visions, by John Fire Lame Deer. On a broader scale, Mircea Eliade's Shamanism puts the whole area of religious experience and practice into a broad historical and ethnographic context.
Note: The term wicasa wakan is pronounced, approximately, as "wih-chah-shah wah-kahn". Sometimes "wicasa" is written "wic'as'a" to indicate that the letters "c" and "s" should both receive accent marks.