A mass spectrometer separates charged particles (usually ions) based on their mass. This involves three steps. First the ions are accelerated to a particular velocity; then just those ions going a particular velocity are passed through to the third and final stage where the separation based on mass takes place.
The simplest way to accelerate ions is to place them between a set of charged parallel plates. The ions are repelled by one plate, attracted to the other, and if we cut a hole in the second plate the ions emerge with a kinetic energy determined by the potential difference between the plates.
K = q | ΔV |