Why are some materials magnetic while others are not?
Magnetism is due to 'electron spin'. Although a charge is necessary for magnetism to occur, it doesn't directly cause materials to be magnetic. In most materials, the electrons 'align' themselves in such a way as to cancel out each others spin. However in certain materials, most notably, iron, there are several electrons whose spin all point in the same direction (the spin points up or down). When this occurs, you get a magnetic material.
Baserrunner316 absolutely right. Also, the way something is magnetic is that all of the electrons are in an organized matter, making the material magnetic. Only iron, steel, and other materials magnetic to a magnet can also be magnetized, others can not be magnetized because of charge.
It has to do with the electrons of an atom (((there are three elements (atoms) that are natural magnets Iron, Nickel and Cobalt))) The electrons are the part of any atom that hold the magnetic force - electricity and magnetism are understood to be fundamentally interlinked. With Iron and Nickel and Cobalt the electrons align themselves such that an accumulation of magnetic forces are focused on either end of each atom. Then once you put a bunch of these atoms into a structure such as a iron ingot and then run electricty through the ingot, you will create a bar magnet, it will keep it's magnetism for a long time