I liked this picture:
http://apod.nasa.gov/apod/ap150127.html It's interesting that the Milky Way has a magnetic field. You get a magnetic field around a current carrying wire because of the movement of the charges within the wire. In this case, it isn't electrons that are moving - it is charged gas atoms. These ions are being rotated around the galactic centre as the Milky Way turns and thus generate a field.