What is the most probable cause of magnetism in a. a bar magnet?b. Earth?
In any magnetic material, there are many tiny domains, each acting like a magnet. If these tiny pockets of magnetism are not lined up, as in a plain ordinary piece of iron, the randomness does not define a single pole. If I have a huge magnetic field and run the iron through it, the random scattering of domains will line up and stay that way for a while after I remove my field, thus making a bar magnet. The Earth is quite different. The Earth's core is not solid but rather molten metal. Electrical currents, caused by the swirling metal causes magnetic fields which add together to become the field of the entire Earth.