The sequence 'OBAFGKMRNS' refers to stars and their classification based on their spectral characteristics. They go from hottest to coolest. Usually, also the hottest stars are the most massive.

O class is the hottest, and their light is distinctly bluish. They are referred as blue supergiants. M is the coolest and dimmest of ordinary stars (red dwarfs), and the three other classes (R, N and S) are special cases of dwarf stars.

The stellar class is defined by the spectrum of the light the star in question emits. Electromagnetic radiation from the star is analyzed by splitting it with a prism or diffraction grating into a spectrum exhibiting the rainbow of colors interspersed with spectral lines. Each line indicates a particular chemical element or molecule, with the line strength indicating the abundance of that element. The strengths of the different spectral lines vary mainly due to the temperature of the photosphere, although in some cases there are true abundance differences. The spectral class of a star is a short code primarily summarizing the ionization state, giving an objective measure of the photosphere's temperature.

The Sun is a G2 class main-sequence star.

The mnemonic on remembering the spectral classes goes "Oh, be a fine girl (guy), kiss me, right now sweetheart".

More Info: en.wikipedia.org