How do astronomers study the sun's interior?
They have computer models of the Sun. This computer model is trying to mimic what would happen in a real star. They start from outside. We know the surface temperature of the sun because it mostly radiates in the yellow, and the Stefan-Boltzman law tells us that the wavelength of maximum emission (the "color") of the surface, is such that
Then they use models of how heat is generated by a mass to say things like "Knowing how heat moves from inside to outside and the given surface temperature, what can we say about the temperature of its core?" It's called an inverse problem, because you're trying to get to the source of heat whereas the direct problem is "given a source" what are the effects.
These models assume the sun is a fluid, charged and subject to magnetic field. It obeys equations of MHD (MagnetoHydrodyamics). These are fluid equations, Maxwell's equations, and heat transfer equation.