It's a part of the Hertzsprung-Russell classification or the Morgan-Keenan of stellar bodies, depending on their heat output from what I understood. Depending on their surface temperatures, stars are labelled O, B, A, F, G, K, and M in the decreasing order. Therefore, the hottest stars are...