The Ultimate Weapon was a bomb designed and later built by Hactar, with the aim of combining the core of every major sun in existence to destroy the Universe. It first appeared in the third novel: Life, the Universe and Everything.
The original Ultimate Weapon was described as "a very, very small bomb". The final one was said to be about the same colour, weight, size, and shape as a cricket ball.
It worked by connecting the heart of every major sun with the heart of every other major sun simultaneously and, when activated, turning the entire Universe into one gigantic hyperspatial supernova.
The Weapon was first commissioned by the Silastic Armourfiends and was to destroy the whole Universe. Hactar was first shocked by the thought, and designed the weapon to fail, leading to him being pulverised by the Armourfiends, though he survived as space dust. The Armourfiends then destroyed the original, dud Weapon.
Later, after manipulating the denizens of the planet Krikkit, Hactar managed to slip the Ultimate Weapon into Arthur Dent's satchel. Arthur later (while revisiting Lord's Cricket Ground) threw the weapon at a Krikkit robot, thinking it a cricket ball. The robot was ready to detonate the weapon with a multi-functional bat, on the orders of Hactar. However, Hactar did not put into the calculation that Arthur was not athletic at all, and the Weapon missed the robot by several feet.