Magnetic confinement fusion
The second method is magnetic fusion. Here magnetic fields are used to force the charged particles plasma exists of into prescribed orbits to prevent them from leaving the fusion device.
The plasma state is the fourth state of matter. Heating a solid yields a fluid. Further heating this fluid, the matter becomes gaseous. When this gas is even further heated (a few thousand degrees Celsius suffice), the negative electrons break loose from the positive ions. The electrically neutral gas then has become a gas composed of charged particles, a plasma.
In a plasma, electrons and ions move independently. Applying an external magnetic field by winding current-carrying wires around it allows confining such a plasma in a cylinder. As the particles are charged, the Lorentz force forces them to trace a helicoidal path around the field lines. For a sufficiently large magnetic field, the radius of the helix is so small that the particles seem "glued" to the magnetic field lines, which thus can be interpreted as invisible "guiding rails". With the present technology, the radius of light ions with energies that are large enough for fusion to occur is merely of the order of 1mm.