A great database showing the existence of magnetic fields in practically all cosmic sources has been collected in recent years. The Earth's magnetic field was in antiquity already known to exist. The detection of the magnetic field of the Sun, by observing the Zeeman effect, goes back to the beginning of this century