The organ is called the trophosome, and it fills most of the worm's trunk. Inside it live sulphur-oxidising bacteria that take hydrogen sulphide from vent fluid and use its chemical energy to fix carbon dioxide into sugars. The worm supplies the raw materials; the bacteria supply the food.
Delivery is the hard part. Hydrogen sulphide poisons the cytochrome system of most animals, and it competes with oxygen for haemoglobin. Riftia carries extracellular haemoglobins that bind sulphide at a separate site from oxygen, so the plume can take up both gases at once and ferry them down to the trophosome without the worm poisoning itself.
What is easy to get wrong is the origin of the bacteria. Riftia larvae are not born with their symbionts and they do have a transient mouth and gut. The bacteria are acquired from seawater after settlement, infecting through the skin, after which the larval digestive tract is remodelled away. The details of how the worm selects the right strain are still being worked out.
