When we run electricity through a wire rolled into a tight coil, the centre is filled with a strong force called magnetism. This force pushes inwards on the electron beam.
This device is called a magnetic lens because it bends the beam of electrons the same way that a glass lens bends a beam of light. A scanning electron microscope usually has more than one lens.