Stellar Temperature Determination for the Temperature of its Photosphere, the part of the star emitting the Electromagnetic Radiation (Surface Temperature), is done by treating the spectrum as a Black-body Spectrum and using Wien's Displacement Law.
Often only part of the spectrum is visible through the Earth's Atmosphere, and in some cases, the shape of the visible spectrum can be compared to Black Body spectra for different temperatures. Obtaining a spectrum of the star derives the best such temperature estimate, but requires Spectroscopy. The Spectral Class derived by Photometry provides an easier-to-obtain approximation, e.g., when data on many stars is needed.
Current methods to determine the temperature of the interior depend upon theory, specifically models of Stellar Structure and its associated processes.