@
uh-oh To answer the magnetism question, you're basically asking "what gives some elements certain properties?"
A level deeper, "Why do elements differ so wildly when you're only slightly changing the number of electrons and protons?"
Those answers are explained by chemistry and quantum mechanics.
Without boring you to death, this is kinda a cool introduction to quantum mechanics