Dilithium is the key to all Star Trek's pseudoscience - but what is this rare and precious crystal, and what can it do? The Star Trek franchise has always indulged in pseudoscience in order to explain away its miracles, but Gene Roddenberry swiftly realized there were risks to using known elements as part of this. Early episodes of Star Trek had referred to "lithium" as key to space travel, but Roddenberry realized that anyone could look into the real-world science and recognized that the show didn't match up to reality at all. As a result, Star Trek made a single subtle change; they substituted "lithium" for "dilithium," an entirely fictional crystalline mineral.
Amusingly, as is so often the case with Star Trek, truth has been inspired by fiction. In 2012, researchers at the University of Huntsville in Alabama were delighted to publicly announce that they were working on a fusion cell using deuterium and a stable isotope of the metal lithium in a crystalline structure, which they compared to dilithium crystals. This has the potential to dramatically speed up space flight to Mars. But in Star Trek, of course, dilithium can do far more.
In Star Trek, dilithium is a rare and naturally-occurring crystal that only exists on a handful of different worlds; the purer the form of dilithium, the more valuable it is because it requires less processing in order to be made usable. Spacefaring societies tend to prioritize dilithium mines, which can generate a massive amount of pollution. But it's generally felt to be worth it; dilithium is used in starship drives, regulating the matter/antimatter reactions that provide the energy necessary to warp through space and travel faster than light. In the Star Trek: Discovery short "Runaway," Po - Queen of the mining planet of Xahia - was persuaded to reveal the secret of recrystallizing dilithium to Starfleet. It may not have been stressed in the episode, but this was a key moment in galactic history; it meant that Starfleet was no longer dependent on an entirely unsustainable resource, because they could recrystallize used dilithium.
There's some evidence that the word "dilithium" may be a short-form way of referring to a whole family of crystalline substances, each of which could potentially have slightly different properties. That may explain why Po's process took some decades to become widespread across Starfleet, and indeed why Spock developed a new process in Star Trek: The Voyage Home; he may have been working with a different crystal from the same family. This would also fit with the Star Trek: Voyager episode "Threshold," in which the Voyager crew discovered a new form of dilithium on an asteroid field in the Delta Quadrant. This strain of dilithium could actually be used to break the transwarp barrier and travel at Warp 10 - but that proved to be a dangerous experiment.
Dilithium remains one of the most important aspects of Star Trek's pseudoscience, even if the show has wisely avoided defining it in concrete terms. Sources of dilithium will always be important, because the raw material itself is essential for warp travel, even if it can then be re-crystallized. It remains to be seen whether real-world scientists will ever find an equivalent.