They get their powers literally from drinking a substance made with spice. It’s explained in the books, and it’s why their lips are stained red (something only the 1984 film actually showed on screen). The bene jesuit (the female witches; probably fucked the spelling up lol) also get powers from a spice-based beverage (the same one Paul consumes). Pretty much any expanded mind powers come directly from the spice, it’s just a matter of degree of how much they take.