Dilithium (chemical symbol Dl, or Dt) is a rare crystalline element found throughout the galaxy. Dilithium is the only known material that can regulate the matter/antimatter reaction, which is why it is used by most species in their warp drives. Different compositions and origins produced slightly different appearances in the crystals, ranging in shape and color.
The planet Direidi is one of the most concentrated locations of Dilithium in known Federation space, and is located on the border to Klingon space. (TOS novel: How Much for Just the Planet?). Pharos, another world on the Federation-Klingon border was also rich in dilithium, to such purity that had it been mined it would not have required refining and that when it was fired upon by the USS Enterprise that entire planet ignited in a chain reaction (EV comic: "The Fires of Pharos").
During the 23rd century, the crystals often deteriorated rapidly during adverse situations, so starships often kept large supplies of them on board. Having a large supply of dilithium almost instantly promotes a planet into prominence in interplanetary politics, as other species seek trade. Some other planets known for their dilithium deposits include Coridan III, Troyius, and Avaton II. (Game: Star Trek: Starfleet Academy - Strategic Command)
During a trip back to the 20th century to retrieve two humpback whales, the dilithium crystals of the Klingon ship Kirk and his crew were using began to wear out. Since fission based nuclear reactors were still in use, Captain Spock determined that it might have been possible to obtain high energy protons from such a reactor, and bombard the crystals with them - thus causing dilithium to recrystallize. After obtaining such protons from the United States aircraft carrier Enterprise, Spock and Engineer Montgomery Scott were able to successfully recrystallize dilithium. (TOS film: Star Trek IV: The Voyage Home)
By the 24th century, the process of recrystallizing dilithium had been refined to the point that it had become routine on board Federation vessels. Using a theta-matrix compositor, dilithium could be recrystallized inside the warp reaction chamber.
Dilithium appeared as an element on a Periodic Table of Elements that contained many jokes not meant to be legible on screen in TNG: "Rascals", with the chemical symbol "Dt". The Star Fleet Medical Reference Manual lists it as symbol Dl.