How do magnets attract and don't attract?