What function or purpose did the witch doctor have in the tribe?

Doctor, mainly medicine, harming headaches, cuts etc. But also they were religious leaders and icons to their community.