Hi faisal,
Mass spectroemtry has evolved with time, nowadays many different techniques are used. DIfferent ionisation techniques, detection techniques and even different techniques are used to control the particle (m/q)-depedent trayectory.
The basic idea is what you said:
-The sample is vaporised (heating or by vacuum free expansion).
-Sample is ionisated normally by electron impact, but it can be also using laser or more recently with induced coupled plasma. This process normally fragments the molecules, so a mixture of different m/q ions is left.
-Now you have a "cloud" of charged particles. You have to accelerate them, just by applying an uniform electric field E. This can be done by putting the sample between two plaques at different potential (the sencond one with a little hole just to let the particles pass). An ion beam is then generated. Bu this ion beam has different m/q particles which travel at different velocities.
Remember:
F=m*a
F=E*q
In order to know the (m/q) of the particles, the most simple (and ancient) method is to put a magnetic field B transverse to the beam. The Lorentz force makes the particles describe a circular trayectory whose radius depends on the m/q relationship
The Lorentz force: F=q*(m X v)
You just can put several detectors cutting different radius trayectories, so depending on which detector makes signal you know the m/q of the particle.
The detectors are normally sensitive plaques that create an electric (or luminiscent) signal with the particle collides with them. They also can be spectroscopic detectors.
Remember that this is the most ancient scheme of the MS. See this link (just to tello you one, there are plenty..):
http://www.asms.org/whatisms/page_index.html