A photon torpedo was a projectile weapon commonly used by Federation starships throughout the 23rd and 24th centuries. The photon torpedo uses shaped charges of antimatter that, when they come in contact with conventional matter, release massive amounts of gamma ray photons, hence the weapon's name. They were developed in part due to the requirement for a weapon, which unlike phasers, could be used at faster than light speeds.
The photon torpedo was later refined so that the matter and antimatter packets were spread throughout the torpedo casing, with magnetic fields in place so that the two substances did not actually touch until the time of detonation. This refinement increased the yield of the torpedo, and was incorporated into Federation weapon systems. (TNG reference: Star Trek: The Next Generation Technical Manual)
The first version of the photon torpedo was introduced in 2215. The were preceded by photonic torpedos, which had been in use by both the Earth and Federation Starfleets since 2153. In 2271, a more advanced version of the photon torpedo was introduced by Starfleet - and the design has been in use since that time. (TNG reference: Star Trek: The Next Generation Technical Manual; ENT episode: "The Expanse")
- Exactly what the difference between photon and photonic torpedoes isn't clear, photonic torpedoes seem to function in much the same way as photon torpedoes and even use similar casings.
In 2293, James T. Kirk and Montgomery Scott simulated a photon torpedo using the deflector dish aboard the USS Enterprise-B to free the vessel from the gravimetric distortions put out by the Nexus. (TNG movie: Generations)
In an alternate timeline where Scott rescued Kirk before he could be absorbed into the Nexus, both the Klingon Empire and Alliance had developed a method of utilizing photon torpedoes to mine valuable assets and hid them using interphase cloaking devices. The Alliance had further increased the energy output and attached the torpedoes to high-output warp drives. (Star Trek novel: Engines of Destiny)