This question was cross-posted on Electronics Stack Exchange. Here is my answer from over there:
Exactly what charged particles are flowing outside (and inside) a permanent magnet that create the magnetic "lines"?
The magnetic field of a permanent magnet is not caused by flowing particles.
The electrons within a ferromagnetic material, even if they aren't flowing, have quantum mechanical spin. If the spin vectors of many of the electrons within the material are aligned, they produce a net magnetic dipole moment, producing the macroscopic magnetic field lines associated with a permanent magnet.
(This is just another way of saying, even when electrons aren't moving, they produce a magnetic field. We don't really know "why" that is, but we have a mathematical model of how much field they produce and how it interacts with other objects, and we call that model the "spin" of the electron).
You can read more about this in the Wikipedia article on Ferromagnetism.
Do those particles come from something inside the magnet or does the magnet do something outside of it to affect unknown particles to make the lines?
It comes from the electrons in the magnetic material.
If there is a current (i.e. a continuous flow of charged particles), then why don't we harness that current like a water wheel
Since the magnetic field doesn't derive from the flow of particles, we can't harvest it as if it were a flow of particles.
We measure B in terms of Newtons/meter/Ampere ... Consequently, those "magnetic lines" are currents (or flows) of charges
The B-field has amperes in its units because it produces a force on a moving charge according to the Lorentz law:
$$\vec{F}=q\vec{v}\times{}\vec{B}$$
Since it is multiplied by a charge and a velocity to produce a force, it must have units $\dfrac{[\mathrm{N}][\mathrm{s}]}{[\mathrm{C}][\mathrm{m}]}$
in order for the equation to balance.
Just as a force itself has $[\mathrm{kg}]$ in its units because it has an effect on something with mass, although a force does not have mass itself; a B-field must have charge in its units because it effects charges, not because it is composed of charge or contains charge.
Before entering into the classification of magnetic materials, let's see how magnetic properties are introduced in a material.
You must have learnt that magnetism is caused by the motion of charges (or a current). All matter are made up of atoms. Atoms contain a massive core called nucleus and orbiting electrons surrounding the nucleus. The electrons are charges. They orbit around the nucleus in a circular (approximate) fashion. It's like a charge continuously circulating through a circular loop of wire. This can be seen as a current flowing through the circular orbit. We know that the magnetic field produced by a circular coil is identical to that of a magnetic dipole (Ampere's hypothesis of a circular current loop) as shown below.
So, this causes a magnetic field to be created by the orbiting electrons. In addition there is another effect that contribute to magnetic effects, which is the spin of electron. The next possible source is nuclear spin, which can usually be neglected in most cases.
Now, the motion of electron is associated with it's angular momentum. So we relate the angular momentum of an electron (both due to orbital and spin motion) to the magnetic effects it could produce.The angular momentum shows how fast the electron is orbiting around the nucleus. This directly relates the current, because more fast the electron rotates, more times we could spot an electron at some point in the orbit in a second, which means more will be the current. More the current, more will be the magnetic moment of the atomic dipole. Like wise for spin.
Now, for those atoms which have paired electrons in the valence shell, the opposite motion of the two electrons cancels their net magnetic moment. So we cannot see any magnetization property on such materials. But certain materials have such an intrinsic property that their individual magnetic dipoles get oriented in a particular fashion so that the generated magnetic field opposes the applied field. This is what that happens in a diamagnetic material. To say, every materials are diamagnetic to some degree. Perfect diamagnetic property are shown by superconducting materials.
Some have unpaired electrons in the outermost shell. So there is no way to cancel out the net magnetic dipole due to individual atom. But, in the absence of a magnetic field, these individual dipoles will be oriented in random directions. On the application of an external field, these dipoles get aligned in the direction of the applied field. This means there arises a positive magnetization in these materials. These are called paramagnetic materials.
Now in the case of ferromagnetic materials, they show permanent magnetization effects. It's because, the atomic dipoles in ferromagnetic materials are not explained by considering individual dipoles, but by using the concept of domains. There are certain regions in the material in which the magnetization is in a uniform direction. You can group that region as a domain. This means that the individual magnetic moments of the atoms are aligned with one another and they point in the same direction in a certain region of the material. So without an externally applied field, there will not be any magnetization as the individual domains will be arranged in a random way. But in the presence of an external field, these domains get aligned in the direction of the field, resulting in a strong magnetization. Now, even if you cut off the field, the magnetization persists.
There are also other materials which show magnetic effects based on domains- ferrimagnetic and anti-ferromagnetic.
Best Answer
How do you think they got magnetized in the first place?
The word "hard" means, high coercivity—the ability of a ferromagnet to resist changes in its magnetization.
You can change the strength and orientation of the "permanent" field of a permanent magnet if you subject it to a sufficiently strong external field—a field strong enough to overcome its coercivity.