How does Magnetism Work?

Magnetism works by lining up opposite poles next to each other and them attracting. When you line up the same sides, they push away from each other. Very few metals are attracted to magnetic force.