Hi;
For the most part, we use the light that the Sun shines to study it, just like telescopes use the light from stars to study them. When we spread the light out and just look at tiny parts of it with high detail (looking at the spectrum, like what you might see when sunlight goes through a prism or crystal, but in much much more detail), we get information about what makes up the Sun (similar with stars), the magnetic fields, the temperatures, etc. See
https://imagine.gsfc.nasa...um/spectra_more.html for a little more from NASA on studying the light from the Sun.