system
Given the following post, respond as if you're commenting on Reddit:
human
How do magnets work on a sub-atomic level?

Basically, I know *of* most scientific concepts, but I don't know them. Is it the case that magnetic materials have an inordinate amount of positively or negatively charged particles and thus attract other substances? Does the entire concept depend on the Earth's magnetic field? Why does the Earth have a magnetic field?
gpt
Something that's very confusing about the electromagnetic force is that there are two kinds of charge, but only one appears (as far as has been observed) in a monopole (or "single charge") state.  "Positive" and "negative" are labels for **electric** charge.  The electron has a negative charge (it is a negative monopole), the proton a positive charge (a positive monopole).  These are commonly tossed around in popular media and are comparatively commonly known.

There is also *magnetic* charge, though there are no magnetic monopoles.  These are labeled "north" and "south," and while electrons possess electric monopoles, they also possess an intrinsic magnetic dipole (or "double charge") moment due to their particular quantum mechanical nature.  Because they are electrically charged, electrons produce electric fields, and because they possess a magnetic dipole moment, they also produce magnetic fields.  Since a monopole and a dipole are different, the fields they produce are shaped differently as well.

If you collect a bunch of electrons together, you will increase the amount of negative charge.  The electric fields of all of the electrons add together, and a collection of 100 electrons produces an electric field 100 times as strong as 1 electron.

Dipoles behave differently.  You can think of a magnetic dipole as a "North" monopole very close to (but not overlapping with) a "South" monopole.  This means when you gather a bunch of electrons together the orientation of the dipole moments matters.  If you place two dipoles side-by-side where the North side of one is next to the North side of the other, from far away it will look like a dipole that has twice the strength of either one alone.  BUT, if you put the *South* side of one next to the *North* side of the other, from far away they will seem to cancel out and produce no magnetic field.^*

Without getting too much into the gory details, in most materials the dipole moments of the electrons in the constituent atoms tend to cancel each other out, but in certain metals (e.g. iron, nickel, and cobalt) many instead align to reinforce each other.  Regions of the metal that have their dipole moments aligned are called **domains**, and in most natural deposits of these metals the domains all roughly cancel out.  By applying a strong magnetic field aligned in one direction, though, you can grow the domains that are oriented opposite to the external field and shrink all others.  Do this repeatedly (without getting the material too hot) and you will produce a permanent magnet.  Ultimately, its magnetic (dipole) field is produced by adding up the dipole fields of the aligned electrons.

As a side note, the source of a magnet's magnetic field being electron dipoles explains why you can't just snap off the North side of a magnet and have a big hunk of North magnetic charge.  The dipoles are all aligned, North to South to North to South etc, so wherever you break the magnet in half, you have a new North side on one and South side on the other, giving you two, new, smaller permanent dipole magnets.

^* To be strictly accurate, this arrangement would produce a *quadrupole* field, but that does not really affect the discussion as it decreases in strength much more rapidly than a dipole field.