Some materials don't stick to a magnet because they aren't magnetic. The article Magnetic materials explains the difference between magnetic and non-magnetic materials.
Most magnetic materials contain iron, nickel, or cobalt. In these materials, some electrons have their spins naturally aligned in the same direction, creating a magnetic field.
In non-magnetic materials, the electrons always pair up with opposite spins, canceling out their magnetic fields.