So, tragically, the tenon has broken off the stem. The tenon is the thin bit that you insert into the wooden bit of the pipe, just to be clear, and it's one of the most vulnerable parts of the pipe.
Alas, reattaching the original tenon generally isn't an option. You can try to glue it back on with some two part epoxy (super glue will not work well at all, I'm afraid), and maybe you'll be lucky, but for all cases of this I've seen, it doesn't bloody work.
So what do?
If your tenon is really stuck in there and won't budge, the second option is to use a screw. Get a screw, any type of wood or plaster screw will do. It needs to be a bit wider than your tenon hole so that it gets some good grip, though not too wide or you won't get it into the tenon. Screw it in and pull on the screw.
If by some black magic the tenon is well and truly cemented in there, drill it out. Use successively thicker drill bits to remove the material until none is left.
Aluminium is a safe choice as it's obviously heat proof where plastics may not be, it definitely isn't toxic and it's easy to work with. If you do end up going with plastic, do make sure you know precisely what type of plastic you're getting, as it needs to be non-toxic at any temperature it's likely to experience while inside your pipe, and it needs to be heat proof. PVC is not an option.
To know what size tube you'll need, measure your original tenon - length and thickness. If you can't do that because the tenon is gone, try to measure the hole it goes into, or the stub where it was once attached to the stem, and go from there to a metal shop or hardware store that sells aluminium tubes in various diameters. Bring your pipe head, and maybe they'll be patient enough with you to let you test-fit the ends of the tube to see what fits you best.
Make sure that the tube wall isn't too thin, as it may fold under repeated stress. About a millimetre thick will do for most tenons.
For the pipe I'm fixing in this tutorial, I went with a tube with a diameter of 6 mm. It was such a small amount of metal that the man at the workshop gave it to me for free. It turned out to be slightly too skinny in the end, but we'll get to that later on.
Use incrementally thicker bits to slowly widen the hole. Once you get to a hole size that neatly fits your aluminium tube, you're done. You'll want a small amount of play, so that the tenon can be moved around a bit - this'll help the final fit and glue-up.
Get out your saw and saw the tube off at the right length. Once it's sawed off, use a file to clean up and round off the end that will protrude from the stem so that it doesn't cut into the wood (or your fingers).
In the above image you can see the tenon in the pipe head to the left (showing it's a bit too loose). To the right, you can see the tenon in the expanded hole in the pipe stem. It's loose there as well, but that's our intention.
If it's too thin (as mine was), there are ways to fix that. I used a short length of shrink tubing, as demonstrated in the image below. We'll see how it goes; if it decays over time, I can always replace it with some epoxy, or lacquer, or something like that. Anything heat proof that isn't toxic will do.
The part of the tube that will end up in the pipe stem has to have a rough surface so that the epoxy has good grip on it. Use a file with a sharp edge or a saw to give it some deep grooves and scratches.
Attach the pipe head the way you'd normally do. You're doing this to ensure that the tenon, which has some play in it, is in precisely the right orientation; if you were to just let the stem dry in whatever position gravity and your drillwork dictate, the head would most likely not sit straight afterward.
After attaching the head, use some masking tape and/or rubber bands to hold it securely in the optimal position. Check if the stem is attached straight, if both parts are snugly fit together, and then leave it overnight.
Take gentle loving care of your pipe, dear reader - but keep in mind that if ever you do break your pipe again, it sure won't be this bit that breaks!