A photon torpedo is a weapon in the Star Trek universe designed to produce concussive damage from the energy released in a controlled matter/antimatter reaction. The physical form of the weapon consists of two parts: a launching system and the warhead itself.
The launching system (or torpedo tube) is essentially a railgun - the torpedo is accelerated to a significant fraction of light-speed by electrodynamic magnets. Once in open space, guidance thrusters kick in to guide the torpedo to its target but most of the accelerative force is provided by the launching systems. Modern torpedo systems are designed to launch groups of torpedoes simultaneously, in some cases up to 10 per volley.
The blast radius from a torpedo detonation is so powerful that utilization at short range is an extremely bad idea.
Torpedo control rooms used to be hazardous places to work - plasma exhaust from the primed thruster systems can cause serious plasma burns if not efficiently vented. 24th century weapon technology automated this system, only requiring human control in the case of extraordinary situations or systems failure.
The torpedo itself consists of a metallic tube approximately 2.5 meters in length. The warhead is comprised of two tanks (one filled with deuterium and one filled with antimatter) separated from contact by a forcefield. When the torpedo reaches its target the forcefield drops, bringing the two reactants into contact. They annihilate each other releasing energy in the process.
Antimatter warheads can be primed with any amount of matter and antimatter, allowing for explosions of different types depending on what is warranted by the situation.
Conventional wisdom (well, of a sort) says that concussive weapons of this type are generally used once an enemy ship's shields have been taken down by directed energy weapons as their energy profile is extremely good at causing hull damage.
Later advances (such as quantum torpedos) have far reduced the prominence of photon torpedos, though their technology is far from being obsolete.
The singular advantage that photon torpedoes have over most directed energy weapons is their ability to be fired at warp speeds - phased light weapons lose cohesion when they pass through a warp field, while torpedoes contain a warp sustainer engine that retains the warp field of its mothership, allowing it to target ships moving at warp while the firing ship is moving at warp as well.
Empty torpedo casings are sometimes used as coffins for Starfleet officers killed in the line of duty while serving on a starship.