Not all stars are the same color. The Sun is yellow. Betelgeuse is Red, and if you look around the sky you will see that some stars are blue.

These colors tell us the temperature of the star. The hotter a star is the more blue light it produces. The cooler a star is the more red light it will produce. This means a hot star is blue and a cool star is red. Medium hot stars are yellow. Think of a fire. The hottest part of the flame is blue, the middle is yellow, and the cooler outer edge of the flame is red. Stars work the same way. This is important because we can't visit other stars to see how hot they are. If we could not figure it out by looking at their color as well as a few other clues in the light they send us, we could never know their temperature.