If neutron stars are made of neutral particles, how can they have magnetic fields?
Neutron stars are not totally made of neutrons-- the interiors have plenty of electrons, protons, and other particles. These charged particles can maintain the magnetic field. Plus, a basic property of magnetism is that once a magnetic field is made, it cannot simply disappear. Stars have magnetic fields because they are composed of plasma, very hot gas made of charged particles. When the star collapses to become a neutron star, it retains that “relic” magnetic field. And since the star gets smaller, the magnetic field gets stronger, since in a sense the field gets denser, more compressed. That is why neutron stars not only have magnetic fields, but why they are so strong.