  Our Universe is full of regions where extreme physical conditions are
realized. A most intriguing case is the super-dense core of neutron stars, some
of which also have super-strong magnetic fields, hence called magnetars. In
this paper we review the current understanding of the physical properties of
the different phases of quark matter at very high densities in the presence of
large magnetic fields. We also discuss how the Meissner instability produced at
moderate densities by a pairing stress due to the medium neutrality and
$\beta$-equilibrium constraints can lead to the spontaneous generation of a
magnetic field.
