Energy is created at the star's center. Next month I will tell you all about that physics. For now all you need to know is that the center of a star is incredibly hot. As that energy works towards the surface it spreads out and cools so the star's surface is much cooler than its core. A star's surface temperature is measured in thousands of degrees - a lot cooler.
Stars have different colors because they have different surface temperatures .
Well, that's true of reflected light and most of the things you see are seen by reflected light. Light shines on something, the reflected light bounces off the object and some of it reaches your eye. Emitted light works differently because it's the light that is produced by the object. Examples of emitted light include the light directly from flames, lamps, your computer screen and stars including the Sun . The Sun produces and emits light, some of which is reflected off the Moon.