Hi Sandra,
We don't really know the answer to that. One of the ways we are trying to find out is by using helioseismology
- the study of how the Sun vibrates. That is the main way we have of
telling what is going on underneath the surface - changes in the
temperatures and motions down there affect how the Sun vibrates like
how making a bell out of different materials can affect the sound it
makes.
We do think sunspots come from deeper underneath the Sun's surface, maybe much deeper.
Using helioseismology scientists have been able to detect sunspots as they rise but before they reach the surface.
In that study they detected a sunspots 60,000 km below the Sun's
surface, a day or two before they were visible with normal telescopes.
Researchers have also been able to investigate what is happening right underneath a sunspot. We can detects flows and temperatures. But we can't go nearly as far down as we would like to!
This is related to a question someone else asked about the depth of sun spots. KD answered that one, so you might want to look at that.
Terry