Stars have a core temperature of anywhere between 5,000 and 200,000,000 degrees Fahrenheit. Temperature widely varies depending on the color of the star. Red stars are the coolest; blue stars are the hottest; and orange, yellow, and white stars fall in between.
To obtain the temperature of a specific star, scientists examine the color of the star. The most common method of doing this is the Johnson UBV system, with UBV standing for the "ultraviolet," "blue," and "visible" light spectrums. This method uses light-sensitive devices to measure the intensity of light that passes through each spectrum. This data indicates star color, from which temperatures can be approximated.