In this application, we made use of the Lorentz force
This force acts upon charged particles that move through electromagnetic fields.
It consists of two components, the electric and the magnetic component.
The first component acts in the direction of the electric field.
The second component, however, acts perpendicular to the magnetic field and the particle trajectory.
This means that the charged particles may be accelerated using electric fields, and deflected using magnetic fields.
If one considers the movement of just one charged particle in a magnetic field, the so called three finger rule may be applied.
There are many applications that use the Lorentz force, for instance electro motors, bicycle dynamos or loudspeakers.
Needless to say, there are also many applications in particle physics: In accelerators, magnetic multipoles are used to manipulate the particle beams.
Dipoles (2 poles) bend the particle trajectory, quadrupoles (4 poles) focus the beam in the horizontal direction while defocusing the beam in the vertical direction, or vice versa.
Thus, one can only focus a beam in one direction at a time.
However, if one chooses clever distances between the quadrupoles, it is possible to obtain a so called beam waist at a certain point in the particle beam.
At this point, the cross section of the beam becomes minimal.
Note that this does not violate Liouville's theorem