[A] What Causes Magnetism?
The mechanics of how do magnets work really breaks right down to the atomic level.
When current flows in a wire a magnetic field is created around the wire. Current is simply a bunch of moving electrons, and moving electrons make a magnetic field. This is how electromagnets are made to work.
Around the nucleus of the atom there are electrons. Scientists used to think that they had circular orbits, but have discovered that things are much more complicated, involving "sub orbitals" within the "main" orbital, and a maximum of 2 electrons can occupy a sub-orbital where one has a spin of up, the other has a spin of down. There can not be two electrons with spin up (or spin down) in the same sub-orbital (the Pauli exclusion principle). Also, when you have a pair of electrons in a sub-orbital, their combined magnetic fields will cancel each other out.

It is generally accepted that ferromagnetic elements have large magnetic moments because of un-paired electrons in their outer orbitals. The spin of the electron is also thought to create a minute magnetic field. These fields have a compounding effect, so when you get a bunch of these fields together, they add up to bigger fields.
To wrap things up on ‘how do magnets work?’, the atoms of ferromagnetic materials tend to have their own magnetic field created by the electrons that orbit them. Small groups of atoms tend to orient themselves in the same direction. Each of these groups is called a magnetic domain.
Each domain has its own north pole and south pole.
When a piece of iron is not magnetized the domains will not be pointing in the same direction, but will be pointing in random directions canceling each other out and preventing the iron from having a north or south pole or being a magnet. If you introduce current(magnetic field), the domains will start to line up with the external magnetic field. The more current applied, the higher the number of aligned domains.
As the external magnetic field becomes stronger, more and more of the domains will line up with it. There will be a point where all of the domains within the iron are aligned with the external magnetic field (this is called "saturation"), no matter how much stronger the magnetic field is made. After the external magnetic field is removed, soft magnetic materials will revert to randomly oriented domains; however, hard magnetic materials will keep most of their domains aligned, creating a strong permanent magnet.