This animation shows the magnetic fields rotating so that you can get a better idea of their structure in nature. The naturally occurring magnetic fields have a slightly different shape than our human-built magnetic arrays, but their function is the same.

 

Here is a cross-section view of the magnetic fields. This is a simplified version of the energy flow within the magnetic fields that confine the green photon. These fields confine the photon and also keep it energized even when it travels for millions of light-years through space. There is a lot more to a photon than just the point the photon occupies. The photon combined with its fields generates the power required to keep the photon lit, but that system is destroyed when a photon is absorbed by a surface. This animation is not to scale, as the fields that confine and keep the photon energized are actually far larger than what is shown here compared to the size of the photon.