Magnetic fields are used to steer the particles in an accelerator.

A charged particle moving in a magnetic field will feel a force that makes it deviate from the original direction of movement. In a circular accelerator, electromagnets are used to create magnetic fields that force the particles to move in a circular orbit.