The development of the advanced long-range torpedoes was one of the many weapon programs overseen by Admiral Alexander Marcus as part of his secret plan to militarize Starfleet. Section 31 and one of it's top agents, John Harrison over the development of these weapons. Harrison was to revolutionize their long-range strike capability.
In the computer simulations, the torpedoes function as they had intended. However unbeknownst to Marcus and Section 31, Harrison (who was in reality Khan Noonien Singh), modified 72 of the torpedoes to smuggle his crew of SS Botany Bay to safety. However, Section 31 and Marcus discovered this plan.(TOS - Khan comics: "Issue 4", "Issue 5")
A few of these torpedoes were at Section 31's London facility when it was bombed, though they were not the ones that Khan retrofitted. Following Khan's terrorist bombing of the Kelvin Memorial Archive in London, Admiral Marcus gave Captain James T. Kirk the 72 retrofitted torpedoes to elimante Khan with on Qo'noS. Following the capture of Khan, Kirk then had Doctors McCoy and Marcus examine one of the torpedoes. However, Dr. McCoy then got his hand stuck inside a torpedo when it armed itself. Luckily, Dr. Marcus was able to defuse and found one of Khan's people inside it.
When Kirk was double-crossed by Khan when they boarded the USS Vengeance, Khan demanded the torpedoes. However, after a warning from Spock's future self, Spock then had the torpedoes armed and ready when he beamed them over. Before doing so, Spock had removed his crew from the torpedoes. Just as Khan was about to destroy the Enterpise, the torpedoes blew up and caused the Vengeance crash land into San Francisco. (TOS movie & novelization: Star Trek Into Darkness)
In 2263, one of the torpedoes was still aboard the Enterprise. When the ship was a boarded by Krall and Swarm drones, Scott placed himself inside the torpedo and landed on Altamid.(TOS movie: Star Trek Beyond)
The torpedoes were classified as Class-12 photon torpedos. Their long-range made it possible for a starship to fire them from a location such as the Neutral Zone to impact a specific location on a planet such Qo'noS which would only take twenty minutes. They were designed to be untraceable and undetectable to Klingon sensors. Their inner case shielding made it impossible for scanners to detect anything.(TOS movie & novelization: Star Trek Into Darkness)