Why+do+stars+shine?

Why do stars shine? The heat from stars orginate from the two sources gravity and nuclear fusion. When the stars at first formed from large balls of gas, they united because of gravity. Once they're hot enough, hydrogen nuclei which is in the plasma in the star's core begins to merge, this produces helium which releases a lot of energy from this process. This heating creates a pressure causing the star to stop uniting. The temperature determines the way the stars shine. Our sun is 5,500 degrees celsius but other stars' temperature can reach up to 50,000 degrees celsius producing a more blue light. Red dwarf stars are cooler and produce mainly red and infrared light.