Plasmas are electrically neutral because of the strong coulombic attraction between + and - charges, however within the plasma - + ions and - electrons can be free (disassociated). The population of free ions = population of electrons, and the population density (degree of ionization) depends on the temperature. Of course, recombination is continuously occurring, and is one source of energy loss from a plasma.
Magnetic confinement of plasmas can be done in solenoidal chambers (z-pinch, tandem mirror reactors) or toroidal chambers (Tokamaks).
The plasmas develop pressure due to high temperature and particle density - PV=nRT, and in confinement, the plasma pressure is balanced by the pressure of the magnetic field. See
http://farside.ph.utexas.edu/teaching/plasma/lectures/node62.html for a discussion of magnetic pressure.
Now think of the Lorentz force of charged particles in a magnetic field. The particles move in circular orbits, the plane of which is perpendicular to the imposed magnetic field and is proportional to the speed of the particle (F = q(v x B). Of course in a plasma, the particles have velocity components parallel to the imposed magnetic field, so the particle trajectories are spiral in natures. The cyclotron motion of the particles also produce an opposing magnetic field - opposite of the direction of the imposed confining magnetic field - and that is why the magnetic field falls off as toward the interior of the plasma.
With respect to magnetic confinement, one can draw the anology of confining Jello (gelatin) or yogurt in one's hands while compressing it - the gelatin or yogurt oozes between the fingers.
A solenoid field is simpler - the magnetic field lines are straight. However, the plasma would leak at the ends, so 'mirror' magnets are employed to raise the magnet field density at the ends. The high magnetic field gradient reflects the charged particles, and the mirrors also take advantage of particle collisions as the plasma density rises in the mirrors.
The toroidal geometry is more complicated. Large 'D-shaped' magnets surround the plasma. They establish magnetic lines parallel to the toroidal axis. However, one problem exists - due to the circular (toroidal) geometry, the toroidal magnetic flux density is higher on the inside than the outside, so the magnetic field applies an outward radial pressure to the plasma (which has a donut or toroidal geometry). Other external magnets however are required to balance the magnetic pressure of the D-magnets.
Additional confinement is applied the a so-called azimuthal field, B_\phi, which is generated by applied a current in the plasma. The advantage here is that it is independent of magnets. The disadvantage is that the induced current is time varying, i.e. pulsed and not steady-state.
Another problem related to the inherent properties of the plasma, such as local density variations, is that the plasma confinement field is not uniform, and the plamsa will migrate to the weakest point and force its way out of the confinement field.
And finally, the particles in the plasma collide so that some particles can achieve much higher energies than the mean plasma energy. The particles at the edge of the plasma can then be scattered out of the plasma.
Please also see - PHY380L Introduction to Plasma Physics http://farside.ph.utexas.edu/teaching/plasma/lectures/lectures.html
from The Institute for Fusion Studies, The University of Texas at Austin