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. (TNG reference: Technical Manual)
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: 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: 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.