Trilithium was a synthetic compound that was an explosive of tremendous power. More importantly, however, it acted as an inhibitor of nuclear reactions, such as the fusion processes within the interior of stars. Even a small amount of trilithium was sufficient to halt all nuclear fusion in a star, resulting in a quantum implosion. The star would collapse under its own mass, generating a shock wave powerful enough to destroy everything in its system. If the star was of sufficient size, the core collapse could lead to a supernova. Trilithium was found in the warp cores of all starships and was very unstable. Mixed with antimatter it formed trilithium resin which was the waste product sent out of the nacelles of starships. One ounce of trilithium was enough to make a bomb which was why it was closely guarded to prevent theft.
In 2369, Arkarian and Human terrorists led by Kelsey boarded and seized control of the USS Enterprise-D while it was powered down for a baryon sweep and made a trilithium bomb by stealing trilithium from the warp core. Captain Picard stopped the terrorist and destroyed their trilithium bomb preventing it from being sold. (TNG: "Starship Mine")
In 2371, the Romulans were experimenting with trilithium but were unable to stabilize it. Their trilithium was stolen in a raid by the Duras sisters, who were contracted to deliver it to Dr. Tolian Soran, in exchange for a functional trilithium-based weapon. Soran used the trilithium to collapse the star Amargosa, in an effort to change the course of the Nexus ribbon. He planned to do the same to the star Veridian, which would have destroyed the pre-industrial civilization on Veridian IV. Soran's plans were thwarted by the USS Enterprise-D, although the Enterprise was lost during the mission. (Star Trek Generations)
A conventional trilithium-based explosive was used by the Akritirian terrorist group Open Sky to bomb the Laktivia recreational facility in 2373. The trilithium used was synthesized from paralithium from an Akritirian freighter. The USS Voyager was originally implicated in the attack, since trilithium could also be synthesized from dilithium. (VOY: "The Chute")
Later that year, in the Alpha Quadrant, the Dominion attempted to detonate a device containing trilithium, tekasite, and protomatter into the Bajoran sun, by way of a Changeling infiltrator hijacking the runabout USS Yukon. At that time, a combined Federation, Klingon, and Romulan fleet was gathered at Deep Space 9 in anticipation of a supposed Dominion attack. The attack was a ruse to wipe out all three fleets and Bajor in a single stroke with the supernova of B'hava'el. The USS Defiant was able to tractor the Yukon away from the sun, and the bomb exploded harmlessly in open space. (DS9: "By Inferno's Light")