As I already promised, here is the article on the basic principle of the magnetically confined fusion plasma.
Reminder:
Before I start, I will remind you what I have already said about magnetic confinement:
Here, plasma is significantly larger (size of a house) than for inertial confinement and chamber is more filled with plasma. But plasma is guided by the magnetic field along the chamber in such manner that plasma does not touch the wall (i.e. as less as possible). The density of magnetically confined plasma is relatively rare, like 1 million times smaller than the air that we breathe in. The low density is compensated with relatively large confinement time at the order of 1 second. In theory, this approach can work continuously, but such an operation was not achieved yet.
Lorentz force
... is a force when the charged particle is moving in a magnetic field. The force is zero when the particle moves along the magnetic field and it is at the maximum while moving perpendicular to the field. The direction of the force is perpendicular to the plane that consists of vectors or particle's velocity and the magnetic field. If the magnetic field goes from you towards the screen, and the particle is moving somewhere along the screen surface - you will get this:
Source: Wikipedia
Now you can see that both, positive and negative particle, movies in a circle. Therefore, making a cylindrical machine that has a magnetic field along the axis could confine the plasma in the ideal world.
Geometries
The initial and basic geometries can be shown in the next picture:
Source: Wiki Commons
The upper one is a simple cylinder with the stronger magnetic field at the ends and weaker at the center. As the stronger field reflects the particles back, the device is named "magnetic mirror". But not all particles bounce at the end, so there are significant losses.
The bottom picture solves mirror losses at the end, by joining ends and making a torus (or ring, to make it more simple). The magnetic field here can be either along the ring or across it. However, such plasma showed as very unstable.
Tokamak & Stellarator
To stabilize toroidal plasma, one needs to have a combination of the magnetic field along and across the ring - the helical field. You can imagine helical field as spiral twisting along the ring.
Here we reached the state-of-the-art for fusion. The best two devices are tokamak and stellarator. The former creates the spiral magnetic field by the combination of external coils and current from plasma, while the latter one has the spiral field totally generated externally.
Trouble
Of course, if there would not be trouble - we would already have power from nuclear fusion. In contrast to inertial fusion, the magnetic fusion already showed to be scientifically feasible (later on this). We are now in the stage of proving its engineering feasibility. The main problem is the chamber wall that encompasses the plasma. You know, the first picture is too ideal and there are many reasons why particles escape from the closed spiral lines of magnetic field.
As I am an expert in magnetic fusion, there will be loads of details to come, stay tuned.
Please feel free to ask anything in the comments. I will either try to answer you in the comment or even make the new post.