The Sun's Magnetic Field
The Sun has a very large and very complex magnetic field. The magnetic field at an average place on the Sun is around 1 Gauss, about twice as strong as the average field on the surface of Earth (around 0.5 Gauss). Since the Sun's surface is more than 12,000 times larger than Earth's, the overall influence of the Sun's magnetic field is vast.
The magnetic field of the Sun actually extends far out into space, beyond the furthest planet (Pluto). This distant extension of the Sun's magnetic field is called the Interplanetary Magnetic Field (IMF). The solar wind, the stream of charged particles that flows outward from the Sun, carries the IMF to the planets and beyond. The solar wind and IMF interact with planetary magnetic fields in complex ways, generating phenomena such as the aurora.
Overall, the basic shape of the Sun's magnetic field is like the shape of Earth's field... or like the field of a simple bar magnet. However, superimposed on this basic field (called a dipole field) is a much more complex series of local fields that vary over time. Places where the Sun's magnetic field is especially strong are called active regions, and often produce telltale sunspots. The local magnetic field in the neighborhood of a large sunspot can be as strong as 4,000 Gauss... much, much greater than the Sun's average field. Disruptions in magnetic fields near active regions can spawn energetic explosions on the Sun such as solar flares and Coronal Mass Ejections. The degree of complexity of the Sun's field waxes and wanes over the course of each sunspot cycle.
The exact nature and source of the Sun's magnetic field are areas of ongoing research. Turbulent motions of charged plasmas in the Sun's convective zone clearly play a role. Some of the Sun's magnetism may even be a remnant from the primordial cloud from which the Sun formed.
Some of the spectacular structures seen in the solar atmosphere, such as solar prominences and coronal loops, are fantastic visible indicators of material flowing along magnetic field lines which arc thousands of kilometers above the Sun's surface.