The methods of measurement of the magnetic fields are indirect. Essentially the measurement of the optical, infrared or radio polarization (e.g. Sofue et al., 1986; Beck, 1986; Heiles, 1976) gives us the basic data. In the case of optical polarization it is the alignment of dust grains by magnetic fields that gives an observable effect. At radio frequencies linearly polarized waves are generated by relativistic electrons in magnetic fields.
A number of effects are responsible for the polarization of optical light. Light scattered by dust grains (Rayleigh scattering) becomes partially polarized with the orientation of the observed polarization perpendicular to a line pointing to the light source. In the case of dust grains aligned in magnetic fields (the Davis-Greenstein effect) we see in the case of the scattered light the polarization perpendicular to the magnetic field while we see the polarization vectors parallel to the field orientation for the directly transmitted light. There are many open questions in the details of the theory of optical polarization generation (e.g. see Purcell, 1979 and Hildebrand, 1988). To study magnetic fields with optical methods a separation of the various effects is necessary.
At radio frequencies the synchrotron emission is emitted with the E vector perpendicular to the orientation of the magnetic field (e.g. Ginzburg and Syrovatskij, 1969). The observed vectors must be corrected for the Faraday rotation which takes place in the galaxy itself, the intergalactic medium and in our Galaxy. To eliminate the Faraday effect we need to have observations at several frequencies. The Faraday effect itself gives us information about the field component parallel to the line of sight. It is also important to consider the effects of different beams for the different frequencies.
The most direct method of measurement of the magnetic fields is the Zeeman effect. The Zeeman effect was observed in molecular clouds as a frequency shift of the opposite circular polarization signals of such molecules as HI, OH, H2O, CCS etc. Such observations give us information about the magnetic field in the molecular clouds. The magnetic field strength can be inferred from the synchrotron emission intensity (using equipartition arguments).