Magnetic fields of galaxies