A yellow star is generally 8,540 to 10,340 degrees Fahrenheit, or 5,000 to 6,000 degrees Kelvin. The color of a star is due to the temperature of the surface of the star.
Stars are enormous balls of gas and super-heated matter called plasma. Stars emit light and heat because their cores are continuously fusing the nuclei of atoms together in a manner similar to a atomic bomb or a nuclear reactor core. This generates huge amounts of radiation, some of which is visible to the human eye in the form of light.
While all stars emit light in a range of colors, they skew toward certain colors depending upon their mass. Very massive stars are extremely hot, even relative to other stars, and they emit light that skews toward blue. Medium-sized stars, such as the sun, emit light that skews toward yellow. Small stars emit light that skews toward red because the color of emitted light is related to the temperature of the object emitting it.