Sunspots provide the best test of magnetohydrodynamic theory under astrophysical conditions. Nowhere else in astrophysics is the theory confronted with such a wealth of detailed observations. Recent, remarkable advances in high-resolution observations provide us with key information that allows us to begin to assemble a coherent picture of the formation of a sunspot, its complicated magnetic and thermal structure, and associated flows and oscillations. Numerical simulations of nonlinear magnetoconvection are beginning to reproduce some of the fine structure observed in a sunspot, including umbral dots, penumbral grains, and light bridges. A new picture of penumbral structure has emerged from the observations, involving two components, with different magnetic field inclination, that remain essentially distinct over the lifetime of the spot. The darker component, in which the magnetic field is more nearly horizontal, includes "returning" magnetic flux tubes that dive back down below the solar surface near the outer edge of the penumbra. These arched flux tubes carry most of the photospheric Evershed flow, which can be attributed to siphon flows driven by pressure drops along thin flux tubes. The returning flux tubes and the curious "interlocking-comb" structure of the penumbral magnetic field can be understood to be a consequence of downward pumping of magnetic flux by the turbulent granular convection in the moat surrounding a sunspot. This robust flux-pumping mechanism, which has been demonstrated in three-dimensional numerical simulations of fully compressible convection, is an important key to understanding the formation and maintenance of the penumbra and the behavior of moving magnetic features in the moat.
Another key to understanding the structure of a sunspot is the array of characteristic oscillations observed in the umbra and penumbra, which serve as a probe of sunspot structure. The techniques of helioseismology have shown that sunspots absorb a significant fraction of the power in incident p-modes. This absorption seems to be due to a conversion of acoustic waves to slow magneto-acoustic waves that leak downward out of the p-mode cavity. Time-distance helioseismology has been used to detect flow patterns in the convection zone beneath a sunspot. A better understanding of the interaction between acoustic and magnetic-acoustic waves in realistic sunspot models is needed in order for the techniques of sunspot seismology to reach their full potential.