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

Ferromagnetic substances

Diamagnetic substances

Paramagnetic substances

Non-magnetic substances