The plasma created by the fusion is magneticslly charged and can be contained and routed via superconducting magnets in a device called a tokamak. That contains much of the energy. Additionally the internals are reinforced steels designed to take reduced damage from fusion heat and neutron bombardment.
I do not know how long one could continuously. I think the longest contained fusion reaction was under 15 minutes so far.
Latest Answers