The document classifies stars based on their surface temperature and color. Class O stars are the hottest with temperatures over 25,000 K and a blue color. Class G stars like our Sun have temperatures between 5,000-6,000 K and are yellow. The coolest stars, Class M, are red and have temperatures below 3,500 K. As a star forms from a nebula, gravitational forces cause the gases and dust to collapse inward toward the core. As the core becomes denser and hotter, nuclear fusion begins, causing the star to shine. Medium stars end as white dwarfs, large stars as neutron stars, and super large stars as black holes.