However, protons are not only spinning, protons are also precessing at a frequency, called Larmor frequency.
You can find that the NMR spectrometers have their field strengths (in Tesla).
e.g. 7 Tesla will give 300 MHz of precession frequency of protons
Larmor frequency = gyromagnetic ratio (in MHz/Tesla) x Bo (in Tesla)
As the no. of protons in ground state is higher (assume the external Bo is pointing upward, z-axis), the net magnetization is pointing upward also.
Then, applying a 90 degree pulse (for example) using radio frequency.
(This pulse can generate a continous radio frequency in particular range, but I am not familiar with this principle.)
This pulse will exite the gd. state protons to ex. state. Not all protons are being exited for 90 degree pulse, it will only make the population between 2 states are the same.
The net magnetization is now on xy plane, and the receiver (on xy plane) convert the signals to peaks by FT.
(I am not quite familiar with this part, just briefly describe it)