magnets attract magnetic substances such as iron, nickel, cobalt etc, They can also repel:

Non-magnetic substances

Diamagnetic substances

Ferromagnetic substances

Paramagnetic substances