Magnetic lens utilize the Lorentz Force which they deflect the charged particles such as electrons or ions. The lens is round shaped with a core of pure iron, surrounded by copper wire (like a simple electromagnet with magnetic force inside). Usually the core of pure iron include four different layers: two outer ones are north poles and the two inner ones are south poles. When charged particles travel through the hole in the middle of the lens the magnetic force will deflect the beam, focus or widen it depending on the type of lens is convex or concave. Another thing important is that there is an electric current running through the wire to create magnetic force so magnetic lens would be heated very quickly as so they need to be cooled down with water or liquid nitrogen.
Magnetic lens have two main aberration types: chromatic aberration (due to the monochrome of the beam) and the spherical aberration (due to the equal spread of magnetic force over the surface area of the magnet's core).
Recently, they use superconductors to create magnetic lens as well to increase perfection of magnetic lens as superconductors can create strong magnetic force in a small region of the core in which improve the correction of spherical aberration. Beside, superconductors can save more power as the current keep running infinitely as there is no resistance. However, as the current is static, it's hard to maintain the strength of the magnetic force that would lead to harsh of maintenance of lens's focal length (the main factor that create the magnification and resolution of the lenses)
For more complex calculations and equations related to magnetic lens, you can search for it on other webpages.