Magnetic fields play an important role in shaping the structure and evolution of the interstellar medium (ISM) of galaxies, but the details of this relationship remain unclear. With SKA1, the 3D structure of galactic magnetic fields and its connection to star formation will be revealed. A highly sensitive probe of the internal structure of the magnetoionized ISM is the partial depolarization of synchrotron radiation from inside the volume. Different configurations of magnetic field and ionized gas within the resolution element of the telescope lead to frequency-dependent changes in the observed degree of polarization. The results of spectro-polarimetric observations are tied to physical structure in the ISM through comparison with detailed modeling, supplemented with the use of new analysis techniques that are being actively developed and studied within the community such as Rotation Measure Synthesis. The SKA will enable this field to come into its own and begin the study of the detailed structure of the magnetized ISM in a sample of nearby galaxies, thanks to its extraordinary wideband capabilities coupled with the combination of excellent surface brightness sensitivity and angular resolution.