The Sun is a giant magnetic star, made of material that moves in concert with the laws of electromagnetism.
Its magnetic field is responsible for everything from the solar explosions that cause space weather on Earth - such as auroras - to the interplanetary magnetic field and radiation through which our spacecraft journeying around the solar system must travel.
"We are not sure exactly where in the Sun the magnetic field is created," said Dean Pesnell, a space scientist at NASA's Goddard Space Flight Centre in Greenbelt, Maryland.
To see these invisible fields, scientists observed the material on the Sun. The Sun is made of plasma, a gas-like state of matter in which electrons and ions have separated, creating a super-hot mix of charged particles.
Also Read
When charged particles move, they naturally create magnetic fields, which in turn have an additional effect on how the particles move.
The plasma in the Sun sets up a complicated system of cause and effect in which plasma flows inside the Sun - churned up by the enormous heat produced by nuclear fusion at the centre of the Sun - create the Sun's magnetic fields. This system is known as the solar dynamo, scientists said.
The solar magnetic system is known to drive the approximately 11-year activity cycle on the Sun. With every eruption, the Sun's magnetic field smooths out slightly until it reaches its simplest state, researchers said.
At that point the Sun experiences what is known as solar minimum, when solar explosions are least frequent. From that point, the Sun's magnetic field grows more complicated over time until it peaks at solar maximum, some 11 years after the previous solar maximum.
"At solar minimum, the field is weaker and concentrated at the poles. It is a very smooth structure that does not form sunspots," he said.
The researchers were able to see how the magnetic fields change, grew and subsided from January 2011 to July 2014.
The magnetic field is much more concentrated near the poles in 2011, three years after solar minimum. By 2014, the magnetic field has become more tangled and disorderly, making conditions ripe for solar events like flares and coronal mass ejections, researchers said.