If you squish hydrogen atoms together hard enough, and hot enough, they release energy.
But it needs to be really really hot - so hot that anything you made it out of would melt.
So what do you do?
You use a magnet. The magnet squishes the really hot hydrogen without actually touching it.
But if you squish one side, the hydrogen will want to go out of the other side. So you have to squish all sides exactly the same amount.
It turns out, it's impossible to make a magnet in the shape of a ball that squishes on all sides equally.
But, it is possible to make one in the shape of a doughnut! That's a tokamak. They are complicated because you also have to use the hydrogen inside the tokamak to help make the magnet work and keep the hydrogen inside.
Another shape that works is a kind of twisted doughnut, this is called a stellarator, if you do that, you don't need to also use the hydrogen inside as a magnet, and this makes it easier. But the twisted shape means it's harder to build because you have to put the magnets in exactly the right place.
The name "tokamak" comes from a sentence in Russian describing the machine, and the name "stellarator" comes from a word that means "sun".
Ah, my favorite theorem, The Hairy Ball Theorem!
To phrase it another way, could you explain why the magnetic field is tangent to the sphere and not normal to it?
The force magnetic fields apply is always perpendicular to the field: F ~ v × B (right hand rule, and all that). So if you want F to point inward, the one component of B that doesn't matter is its radial component---ie. the tangent component is all that counts. But it's not clear to me that you can't compensate for the restrictions of the hairy ball theorem by having a nonuniform velocity distribution. Of course, there's no "hairy torus" theorem (because it's not true!) and this immediately suggests the tokamak design.
It's also not possible to take a sphere and have the radial magnetic field point inward everywhere (or outward everywhere), because Maxwell's equations prohibit magnetic monopoles.
And of course, the last point about no magnetic monopoles should be sufficient to make a spherical field impossible.
Wiki: However, stellarators, unlike tokamaks, do not require a toroidal current, so that the expense and complexity of current drive and/or the loss of availability and periodic stresses of pulsed operation can be avoided, and there is no risk of toroidal current disruptions. It might be possible to use these additional degrees of design freedom to optimize a stellarator in ways that are not possible with tokamaks.
With the donut, the problem is similar to trying to inflate a balloon that has a weak point in it. Blowing causes the weak point to inflate instead of the balloon.
Plasmas are electrically charged and have their own magnetic field. Trying to squeeze down on the plasma inside the donut shape to cause fusion causes the plasma's own magnetic strength to increase and counter the field being applied to it.
The stellarator works with the plasma's magnetic field instead of against it by spiraling it around in circles.
But for complicated reasons, it just isn't efficient enough to actually produce net power output. Of course, neither is any other design right now, but magnetic confinement appears to be the more promising path forward.
Now I'm really puzzled why no one has tried a more naive approach. I'm picturing a hollow metal sphere with a high positive charge with positive ions inside of it. Wouldn't it push them all together and with a high enough charge get them hot enough to fuse?
Fusion reaction has pros over fission in that a fusion reaction produces a lot more energy than a fission - and that it can't 'melt down' - unlike fission it doesn't have to be kept in check. If Homer Simpson messes up at the fusion plant, the reaction will just stop. Why? Because for fusion to happen, the atoms (hydrogens) need to overcome their electrostatic repulsion of eachother - the Coulomb barrier generated by the protons in the nuclei (at fusion temps the atoms have all become ionized - electrons have shot off from the atoms, so you have electrons and positively charged nuclei flying around - aka a charged gas aka a plasma).
Anyway that coulomb force has the same dependence on distance as gravity (1/r^2) - but unlike gravity - is a repulsive force. If you can force the atoms close enough together (by putting them under high temperature and pressure) then they will be close enough that the nuclei of the atoms will be pulled together by a stronger attractive force - the nuclear force - which only works at a very short range. As mentioned, you have to get the atoms going really fast and really close together for this to happen (put the gas under high temp and pressure, which incidentally will ionize the gas atoms into electrons and positively charged ions).
The fact that it is now 'electric' is the key to both approaches (tokamak and stellarator) at containing the plasma. These are just two approaches at Magnetically Confined Fusion, which operates on the simple principle that charged particles (both electrons and the ions that you are trying to fuse w other ions) travel along magnetic field lines. They spin in tight little circles around magnetic field lines, the stronger the magnetic field, the tighter the circle. Tokamak, which is simpler than a stellarator, is basically a solenoid https://en.m.wikipedia.org/wiki/Solenoid that wraps around into a donut shape. Just as the magnetic field lines in a solenoid go along the length of the solenoid, the magnetic field lines in a tokamak will go around the donut (toroidal field). Just imagine that the tokamak magnets are really powerful so the magnetic field lines (not really lines) are really strong - then your ions will gyrate around and bump into other ions that are gyrating around B-lines. There are problems though.
It's been a while since I studied but basically, in addition to ions and electrons very fast giration around the magnetic field 'line' and it's slower movement along the field line (around the donut) - it also 'drifts' https://en.m.wikipedia.org/wiki/Guiding_center - this is the slowest movement. There are a few mechanisms that cause this drift, but to the great misfortune of mankind, these drifts are 'out' - the ions drift away from the plasma core, and towards the wall of the tokamak.
To stop this drift from happening, you need the toroidal (around the donut) B field lines to also twist, so they look like a twizzler that has been wrapped around on itself. In a tokamak this is generally done by running a current through the plasma around the donut. Plasmas are highly conductive, so you can do this. It is like a big coil of wire. Just like the coils on a solenoid generate a straight B field through the center of a solenoid, and the coils of a tokamak (donut shaped solenoid) generate a donut shaped B field, running a current through the donut shaped plasma will generate a B field from the ceiling to the floor thru the donut hole (the poloidal field). The poloidal and toroidal fields vector add to make your twirly twizzler shaped field that prevents drifts. This running a current thru the plasma is how you 'twist' the field in tokamaks.
Stellerators, on the other hand, generate the field with complex (very) magnetic configuration (look up images of WX-7). There is no need to run current thru the plasma, and this in theory, and I think now in practice, with WX-7, leads to a more stable plasma. This stability issue is very important. Scientists have known about drifts since year 0 of fusion research, but there are many instabilities that cause the plasma to break down.
As mentioned in the article - there is a triple product that basically describes the success of the plasma - plasma density, plasma temperature and confinement time. This is more or less equivalent to 'are we getting more energy out than we are putting in' and I believe the advantage of stellerator would be confinement time. Hopefully these brainiacs can get it happening.