In Dune, spice is a necessity. Without it, there can be no safe way to navigate through space. It extends lifespans and has a whole range of health and cosmetic benefits. It’s still a drug and addictive, though. The withdrawal process, however, is said to be fatal, which is why those that take Spice must keep taking it -- It’s a matter of life and death. The Spice in Dune promotes longevity and enhances mental power. Once someone reaches the Kwizatz Haderach stage, the spice conveys godlike power.
The spice is used to define a refined substance taken from the worms of Arrakis, basically, Herbert took an earlier concept and took it to the extreme. A spice makes you healthier, basically better, stronger and smarter, better reflexes and perception, even gives you visions and can cause radical mutations.
It allows people to predict the future. It also changed them from having a human form to, well, the Navigators. If you have committed to spices, you have to keep taking them. Otherwise, withdrawal is fatal.
Long life and expanded consciousness. To a greater degree if you have a biological or psychological predisposition. In the Dune universe, many people have cultivated such predispositions for specialized applications.
The Bene Gesserit learned the ability to change her own body chemistry at her request and use that chemistry to modify/enhance the effects of the spice. The Fremen use this ability, along with highly concentrated spice, to transmit psychic information to one another
In Star Wars, in a way, it resembles the spices of pre-Herbert novels and that is an incredibly addictive drug.
Beyond the name and that, like all drugs, it is addictive, it is nothing like the Arrakis spices because they do not give you super abilities. They do not come from a worm as such. The spices are a mineral component that is extracted thanks to slave labor.
Spice in Star Wars is central to a criminal cartel, it is a highly addictive illegal narcotic that when smoked gives the user feelings of euphoria. The consumption of spices in star wars only makes you feel good, it can alter the states of consciousness, mood and thought. They are psychoactive substances, for example, tobacco, alcohol, cannabis, amphetamines, ecstasy, cocaine and heroin. But unlike Dune they remind me more of pre herbert spices.