My sources on shamanism are common knowledge, some encyclopedia articles, Graham Hancock's Supernatural, Thomas McEvilley's The Shape of Ancient Thought, and various documentaries and articles. I quote from Eliade in an article on Jesus and shamanism, linked below.
The general idea is that shamans were isolated, one-man spiritual operations, as McEvilley points out. They communed with the spirit world via psychedelics, and that special knowledge or relationship was supposed to guide the tribe. More sociologically, this social function was a way of putting to work certain mental disorders or antisocial characteristics.
https://www.britannica.com/topic/shamanism
https://www.encyclopedia.com/medicine/diseases-and-conditions/pathology/shamanism